File: seeds_extension.cpp

package info (click to toggle)
seqan2 2.4.0%2Bdfsg-16
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 224,180 kB
  • sloc: cpp: 256,886; ansic: 91,672; python: 8,330; sh: 995; xml: 570; makefile: 252; awk: 51; javascript: 21
file content (29 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (10)
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
//Examples for three seed extension algorithms.
#include <iostream>
#include <seqan/seeds.h>

using namespace seqan;

int main()
{
    String<char> a = "SEEDabXcdXefXXX";
    String<char> b = "SEEDabYcdefYYYY";

    Seed<Simple> seed1(0, 0, 4);          //left=0; length=4
    extendSeed(seed1, a, b, EXTEND_BOTH, MatchExtend());
    std::cout << "endPositionH(seed1) = " << endPositionH(seed1) << std::endl;
    std::cout << "endPositionV(seed1) = " << endPositionV(seed1) << std::endl;

    Seed<Simple> seed2(0, 0, 4);          //left=0; length=4
    Score<> scoring(1, -1, -1);
    extendSeed(seed2, a, b, EXTEND_BOTH, scoring, 2, UnGappedXDrop());
    std::cout << "endPositionH(seed2) = " << endPositionH(seed2) << std::endl;
    std::cout << "endPositionV(seed2) = " << endPositionV(seed2) << std::endl;

    Seed<Simple> seed3(0, 0, 4);          //left=0; length=4
    extendSeed(seed3, a, b, EXTEND_BOTH, scoring, 2, GappedXDrop());
    std::cout << "endPositionH(seed3) = " << endPositionH(seed3) << std::endl;
    std::cout << "endPositionV(seed3) = " << endPositionV(seed3) << std::endl;

    return 0;
}