]> git.donarmstrong.com Git - mothur.git/blob - classifyseqscommand.h
started work on sffinfo command. fixed bug across all paralellized commands if the...
[mothur.git] / classifyseqscommand.h
1 #ifndef CLASSIFYSEQSCOMMAND_H
2 #define CLASSIFYSEQSCOMMAND_H
3
4 /*
5  *  classifyseqscommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 11/2/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 //#include "alignment.hpp"
16 #include "classify.h"
17
18 //KNN and Bayesian methods modeled from algorithms in
19 //Naı¨ve Bayesian Classifier for Rapid Assignment of rRNA Sequences 
20 //into the New Bacterial Taxonomy􏰎† 
21 //Qiong Wang,1 George M. Garrity,1,2 James M. Tiedje,1,2 and James R. Cole1* 
22 //Center for Microbial Ecology1 and Department of Microbiology and Molecular Genetics,2 Michigan State University, 
23 //East Lansing, Michigan 48824 
24 //Received 10 January 2007/Accepted 18 June 2007 
25
26
27
28 class ClassifySeqsCommand : public Command {
29         
30 public:
31         ClassifySeqsCommand(string);
32         ~ClassifySeqsCommand();
33         int execute(); 
34         void help();    
35         
36 private:
37         struct linePair {
38                 unsigned long int start;
39                 int numSeqs;
40                 linePair(unsigned long int i, int j) : start(i), numSeqs(j) {}
41         };
42         vector<int> processIDS;   //processid
43         vector<linePair*> lines;
44         vector<string> fastaFileNames;
45         vector<string> namefileNames;
46         vector<string> groupfileNames;
47         map<string, vector<string> > nameMap;
48         map<string,  vector<string> >::iterator itNames;
49         
50         Classify* classify;
51         
52         string fastaFileName, templateFileName, distanceFileName, namefile, search, method, taxonomyFileName, outputDir, groupfile;
53         int processors, kmerSize, numWanted, cutoff, iters;
54         float match, misMatch, gapOpen, gapExtend;
55         bool abort, probs;
56         
57         int driver(linePair*, string, string, string);
58         void appendTaxFiles(string, string);
59         void createProcesses(string, string, string); 
60         string addUnclassifieds(string, int);
61         
62         int MPIReadNamesFile(string);
63         #ifdef USE_MPI
64         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector<long>&);
65         #endif
66 };
67
68 #endif
69