File: needlemanoverlap.hpp

package info (click to toggle)
mothur 1.48.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,684 kB
  • sloc: cpp: 161,854; makefile: 122; sh: 31
file content (47 lines) | stat: -rwxr-xr-x 1,438 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
43
44
45
46
47
#ifndef NEEDLEMAN_H
#define NEEDLEMAN_H

/*
 *  needleman.h
 *  
 *
 *  Created by Pat Schloss on 12/15/08.
 *  Copyright 2008 Patrick D. Schloss. All rights reserved.
 *
 *	This class is an Alignment child class that implements the Needleman-Wunsch pairwise alignment algorithm as
 *	described in:
 *		
 *	Needleman SB & Wunsch CD.  1970.  A general method applicable to the search for similarities in the amino acid
 *		sequence of two proteins.  J Mol Biol.  48:443-53.
 *	Korf I, Yandell M, & Bedell J.  2003.  BLAST.  O'Reilly & Associates.  Sebastopol, CA.
 *
 *	This method is simple as it assesses a consistent penalty for each gap position.  Because this method typically has
 *	problems at the ends when two sequences do not full overlap, we employ a separate method to fix the ends (see
 *	Overlap class documentation)
 *
 */

#include "mothur.h"
#include "alignment.hpp"

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

class NeedlemanOverlap : public Alignment {
	
public:
	NeedlemanOverlap(float, float, float, int);
	~NeedlemanOverlap();
	void align(string, string, bool createBaseMap=false);
    void align(Sequence, Protein);
    void alignPrimer(string, string);
	
private:	
	float gap;
	float match;
	float mismatch;
    bool isEquivalent(char, char);
};

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

#endif