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