File: profile_seq_score.cpp

package info (click to toggle)
seqan2 2.4.0%2Bdfsg-16
  • links: PTS, VCS
  • area: main
  • in suites: 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 (28 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (7)
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
#include <iostream>
#include <seqan/align_profile.h>

using namespace seqan;

int main()
{
    typedef ProfileChar<Dna, int> TDnaProfile;
    typedef String<TDnaProfile> TProfileString;

    TProfileString profile = "CGAT";
    DnaString seq = "CGGAAT";

    Gaps<TProfileString> gapsH(profile);
    Gaps<DnaString> gapsV(seq);

    Score<int, ProfileSeqScore> sScheme(profile);

    int val = globalAlignment(gapsH, gapsV, sScheme, NeedlemanWunsch());
    std::cout << "score value = " << val << "\n";

    std::cout << "gaps in profile/sequence\n"
              << "pos\tG\tS\n";
    for (unsigned i = 0; i < length(gapsH); ++i)
        std::cerr << i << "\t" << isGap(gapsH, i) << "\t" << isGap(gapsV, i) << "\n";

    return 0;
}