]> git.donarmstrong.com Git - mothur.git/blob - chimeraslayer.h
added multiple processors option for Windows users to align.seqs, dist.seqs, summary...
[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, string, int);
28                 ChimeraSlayer(string, string, bool, map<string, int>&, string,  int, int, int, int, float, int, int, int, int, int, int, int, int, bool, string, int);
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                 int getNumNoParents() { return numNoParents; }
38                 data_results getResults() { return printResults; }
39                 
40                 #ifdef USE_MPI
41                 Sequence print(MPI_File&, MPI_File&);
42                 Sequence print(MPI_File&, MPI_File&, data_results, data_results);
43                 #endif
44                 
45         private:
46                 Sequence querySeq;
47                 Sequence trimQuery;
48                 DeCalculator decalc;
49                 Database* databaseRight;
50                 Database* databaseLeft;
51                 map<string, int> priority; //for template=self, seqname, seqAligned, abundance
52                 set<string> chimericSeqs; //for template=self, so we don't add chimeric sequences to the userTemplate set
53                 int numNoParents, threadID;
54         
55                 vector<data_struct>  chimeraResults;
56                 data_results printResults;
57                 string chimeraFlags, searchMethod, fastafile, blastlocation;
58                 bool realign, trimChimera;
59                 int window, numWanted, kmerSize, match, misMatch, minSim, minCov, minBS, minSNP, parents, iters, increment;
60                 float divR;
61         
62                 void printBlock(data_struct, string, ostream&);
63                 void printBlock(data_results, data_results, bool, bool, string, ostream&);
64                 string getBlock(data_struct, string);
65                 string getBlock(data_results, data_results, bool, bool, string);
66                 //int readNameFile(string);
67                 vector<Sequence*> getTemplate(Sequence, vector<Sequence*>&);
68                 vector<Sequence> getRefSeqs(Sequence, vector<Sequence*>&, vector<Sequence*>&);
69                 vector<Sequence> getBlastSeqs(Sequence, vector<Sequence*>&, int);
70                 vector<Sequence> getKmerSeqs(Sequence, vector<Sequence*>&, int);
71                 
72 };
73
74 /************************************************************************/
75
76 #endif
77
78