File: kmeralign.h

package info (click to toggle)
mothur 1.48.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,676 kB
  • sloc: cpp: 161,854; makefile: 119; sh: 31
file content (42 lines) | stat: -rwxr-xr-x 959 bytes parent folder | download | duplicates (4)
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
#ifndef KMERALIGN_N
#define KMERALIGN_N

/*
 *  kmeralign.h
 *
 *
 *  Created by Pat Schloss on 4/6/14.
 *  Copyright 2014 Patrick D. Schloss. All rights reserved.
 *
 *	This class is an Alignment child class that implements a kmer-based pairwise alignment algorithm
 *  for making contigs of reads without insertions
 *
 *
 */

#include "alignment.hpp"
#include "kmer.hpp"

#        define PHREDMAX 46
#        define PHREDCLAMP(x) ((x) > PHREDMAX ? PHREDMAX : ((x) < 0 ? 0 : (x)))


/**************************************************************************************************/

class KmerAlign : public Alignment {
	
public:
	KmerAlign(int);
	~KmerAlign();
    void align(string, string, bool createBaseMap=false);
	
private:
    int kmerSize;
    int maxKmer;
    Kmer kmerLibrary;
    double calcProb(string A, string B, int overlap);
};

/**************************************************************************************************/

#endif