]> git.donarmstrong.com Git - mothur.git/blob - chimeraslayer.h
working on removing pointers from chimera.slayer to eliminate pesky memory leaks
[mothur.git] / chimeraslayer.h
1 #ifndef CHIMERASLAYER_H
2 #define CHIMERASLAYER_H
3
4 /*
5  *  chimeraslayer.h
6  *  Mothur
7  *
8  *  Created by westcott on 9/25/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 #include "chimera.h"
15 #include "maligner.h"
16 #include "slayer.h"
17
18
19
20 //***********************************************************************/
21 //This class was modeled after the chimeraSlayer written by the Broad Institute
22 /***********************************************************************/
23
24 class ChimeraSlayer : public Chimera {
25         
26         public:
27                 ChimeraSlayer(string, string, bool, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
28                 ChimeraSlayer(string, string, bool, map<string, int>&, string,  int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
29
30                 ~ChimeraSlayer();
31                 
32                 int getChimeras(Sequence*);
33                 Sequence print(ostream&, ostream&);
34                 Sequence print(ostream&, ostream&, data_results, data_results);
35                 void printHeader(ostream&);
36                 int doPrep();
37                 data_results getResults() { return printResults; }
38                 
39                 #ifdef USE_MPI
40                 Sequence print(MPI_File&, MPI_File&);
41                 Sequence print(MPI_File&, MPI_File&, data_results, data_results);
42                 #endif
43                 
44         private:
45                 Sequence querySeq;
46                 Sequence trimQuery;
47                 DeCalculator decalc;
48                 Database* databaseRight;
49                 Database* databaseLeft;
50                 map<string, int> priority; //for template=self, seqname, seqAligned, abundance
51                 set<string> chimericSeqs; //for template=self, so we don't add chimeric sequences to the userTemplate set
52         
53                 vector<data_struct>  chimeraResults;
54                 data_results printResults;
55                 string chimeraFlags, searchMethod, fastafile;
56                 bool realign, trimChimera;
57                 int window, numWanted, kmerSize, match, misMatch, minSim, minCov, minBS, minSNP, parents, iters, increment;
58                 float divR;
59         
60                 void printBlock(data_struct, string, ostream&);
61                 void printBlock(data_results, data_results, bool, bool, string, ostream&);
62                 string getBlock(data_struct, string);
63                 string getBlock(data_results, data_results, bool, bool, string);
64                 //int readNameFile(string);
65                 vector<Sequence*> getTemplate(Sequence, vector<Sequence*>&);
66                 vector<Sequence> getRefSeqs(Sequence, vector<Sequence*>&, vector<Sequence*>&);
67                 vector<Sequence> getBlastSeqs(Sequence, vector<Sequence*>&, int);
68                 vector<Sequence> getKmerSeqs(Sequence, vector<Sequence*>&, int);
69                 
70 };
71
72 /************************************************************************/
73
74 #endif
75
76