]> git.donarmstrong.com Git - mothur.git/blob - chimeraslayer.h
working on chimera.slayer
[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 //This class was modeled after the chimeraSlayer written by the Broad Institute
20 /***********************************************************************/
21
22 class ChimeraSlayer : public Chimera {
23         
24         public:
25                 ChimeraSlayer(string, string, bool, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
26                 ChimeraSlayer(string, string, bool, map<string, int>&, string,  int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
27
28                 ~ChimeraSlayer();
29                 
30                 int getChimeras(Sequence*);
31                 Sequence* print(ostream&, ostream&);
32                 Sequence* print(ostream&, ostream&, data_results, data_results);
33                 void printHeader(ostream&);
34                 int doPrep();
35                 data_results getResults() { return printResults; }
36                 
37                 #ifdef USE_MPI
38                 Sequence* print(MPI_File&, MPI_File&);
39                 Sequence* print(MPI_File&, MPI_File&, data_results, data_results);
40                 #endif
41                 
42         private:
43                 Sequence* querySeq;
44                 Sequence trimQuery;
45                 DeCalculator* decalc;
46                 Database* databaseRight;
47                 Database* databaseLeft;
48                 map<string, int> priority; //for template=self, seqname, seqAligned, abundance
49                 set<string> chimericSeqs; //for template=self, so we don't add chimeric sequences to the userTemplate set
50         
51                 vector<data_struct>  chimeraResults;
52                 data_results printResults;
53                 string chimeraFlags, searchMethod, fastafile;
54                 bool realign, trimChimera;
55                 int window, numWanted, kmerSize, match, misMatch, minSim, minCov, minBS, minSNP, parents, iters, increment;
56                 float divR;
57         
58                 void printBlock(data_struct, string, ostream&);
59                 void printBlock(data_results, data_results, bool, bool, string, ostream&);
60                 string getBlock(data_struct, string);
61                 string getBlock(data_results, data_results, bool, bool, string);
62                 //int readNameFile(string);
63                 vector<Sequence*> getTemplate(Sequence*, vector<Sequence*>&);
64                 vector<Sequence*> getRefSeqs(Sequence*, vector<Sequence*>&, vector<Sequence*>&);
65                 vector<Sequence*> getBlastSeqs(Sequence*, vector<Sequence*>&, int);
66                 vector<Sequence*> getKmerSeqs(Sequence*, vector<Sequence*>&, int);
67                 
68 };
69
70 /************************************************************************/
71
72 #endif
73
74