File: maligner.h

package info (click to toggle)
mothur 1.33.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,248 kB
  • ctags: 12,231
  • sloc: cpp: 152,046; fortran: 665; makefile: 74; sh: 34
file content (59 lines) | stat: -rw-r--r-- 1,908 bytes parent folder | download | duplicates (2)
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
#ifndef MALIGNER_H
#define MALIGNER_H
/*
 *  maligner.h
 *  Mothur
 *
 *  Created by westcott on 9/23/09.
 *  Copyright 2009 Schloss Lab. All rights reserved.
 *
 */
 
#include "decalc.h"
#include "chimera.h"
#include "database.hpp"

/***********************************************************************/
//This class was modeled after the chimeraMaligner written by the Broad Institute
/**********************************************************************/
class Maligner {

	public:
		
		Maligner(vector<Sequence>, int, int, float, int, int); //int, int, int, , string, Database*, Database*
		~Maligner() {};
		
		string getResults(Sequence, DeCalculator);
		float getPercentID() {	return percentIdenticalQueryChimera;	}
		vector<results> getOutput()  {	return outputResults;			}
		
				
	private:
		Sequence query;
		vector<Sequence> refSeqs;
		vector<Sequence> db;
		int minCoverage, minSimilarity, matchScore, misMatchPenalty;
		float minDivR, percentIdenticalQueryChimera;
		vector<results> outputResults;
		map<int, int> spotMap;
		vector<int> unalignedMap;
		vector<Sequence> minCoverageFilter(vector<Sequence>);  //removes top matches that do not have minimum coverage with query.
		int computeChimeraPenalty();
		vector<Sequence> verticalFilter(vector<Sequence>);
		
		vector< vector<score_struct> > buildScoreMatrix(int, int);
		void fillScoreMatrix(vector<vector<score_struct> >&, vector<Sequence>, int);
		vector<score_struct> extractHighestPath(vector<vector<score_struct> >);
		vector<trace_struct> mapTraceRegionsToAlignment(vector<score_struct>);
		string constructChimericSeq(vector<trace_struct>, vector<Sequence>);
		string constructAntiChimericSeq(vector<trace_struct>, vector<Sequence>);
		float computePercentID(string, string);
		string chimeraMaligner(int, DeCalculator);
		MothurOut* m;
		
};

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

#endif