]> git.donarmstrong.com Git - mothur.git/blob - classifyseqscommand.h
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[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 "classify.h"
16
17 //KNN and Bayesian methods modeled from algorithms in
18 //Naı¨ve Bayesian Classifier for Rapid Assignment of rRNA Sequences 
19 //into the New Bacterial Taxonomy􏰎† 
20 //Qiong Wang,1 George M. Garrity,1,2 James M. Tiedje,1,2 and James R. Cole1* 
21 //Center for Microbial Ecology1 and Department of Microbiology and Molecular Genetics,2 Michigan State University, 
22 //East Lansing, Michigan 48824 
23 //Received 10 January 2007/Accepted 18 June 2007 
24
25
26
27 class ClassifySeqsCommand : public Command {
28         
29 public:
30         ClassifySeqsCommand(string);
31         ClassifySeqsCommand();
32         ~ClassifySeqsCommand();
33         
34         vector<string> setParameters();
35         string getCommandName()                 { return "classify.seqs";               }
36         string getCommandCategory()             { return "Phylotype Analysis";  }
37         string getHelpString(); 
38         
39         int execute(); 
40         void help() { m->mothurOut(getHelpString()); }  
41         
42         
43         
44 private:
45         struct linePair {
46                 unsigned long int start;
47                 unsigned long int end;
48                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
49         };
50
51         vector<int> processIDS;   //processid
52         vector<linePair*> lines;
53         vector<string> fastaFileNames;
54         vector<string> namefileNames;
55         vector<string> groupfileNames;
56         vector<string> outputNames;
57         map<string, vector<string> > nameMap;
58         map<string,  vector<string> >::iterator itNames;
59         
60         Classify* classify;
61         
62         string fastaFileName, templateFileName, distanceFileName, namefile, search, method, taxonomyFileName, outputDir, groupfile;
63         int processors, kmerSize, numWanted, cutoff, iters;
64         float match, misMatch, gapOpen, gapExtend;
65         bool abort, probs;
66         
67         int driver(linePair*, string, string, string);
68         void appendTaxFiles(string, string);
69         int createProcesses(string, string, string); 
70         string addUnclassifieds(string, int);
71         
72         int MPIReadNamesFile(string);
73         #ifdef USE_MPI
74         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
75         #endif
76 };
77
78 #endif
79