1 #ifndef CLASSIFYSEQSCOMMAND_H
2 #define CLASSIFYSEQSCOMMAND_H
5 * classifyseqscommand.h
8 * Created by westcott on 11/2/09.
9 * Copyright 2009 Schloss Lab. All rights reserved.
14 #include "command.hpp"
16 #include "referencedb.h"
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
28 class ClassifySeqsCommand : public Command {
31 ClassifySeqsCommand(string);
32 ClassifySeqsCommand();
33 ~ClassifySeqsCommand();
35 vector<string> setParameters();
36 string getCommandName() { return "classify.seqs"; }
37 string getCommandCategory() { return "Phylotype Analysis"; }
38 string getHelpString();
39 string getCitation() { return "Wang Q, Garrity GM, Tiedje JM, Cole JR (2007). Naive Bayesian classifier for rapid assignment of rRNA sequences into the new bacterial taxonomy. Appl Environ Microbiol 73: 5261-7. [ for Bayesian classifier ] \nAltschul SF, Madden TL, Schaffer AA, Zhang J, Zhang Z, Miller W, Lipman DJ (1997). Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. Nucleic Acids Res 25: 3389-402. [ for BLAST ] \nDeSantis TZ, Hugenholtz P, Larsen N, Rojas M, Brodie EL, Keller K, Huber T, Dalevi D, Hu P, Andersen GL (2006). Greengenes, a chimera-checked 16S rRNA gene database and workbench compatible with ARB. Appl Environ Microbiol 72: 5069-72. [ for kmer ] \nhttp://www.mothur.org/wiki/Classify.seqs"; }
40 string getDescription() { return "classify sequences"; }
43 void help() { m->mothurOut(getHelpString()); }
49 unsigned long int start;
50 unsigned long int end;
51 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
54 vector<int> processIDS; //processid
55 vector<linePair*> lines;
56 vector<string> fastaFileNames;
57 vector<string> namefileNames;
58 vector<string> groupfileNames;
59 vector<string> outputNames;
60 map<string, vector<string> > nameMap;
61 map<string, vector<string> >::iterator itNames;
66 string fastaFileName, templateFileName, distanceFileName, namefile, search, method, taxonomyFileName, outputDir, groupfile;
67 int processors, kmerSize, numWanted, cutoff, iters;
68 float match, misMatch, gapOpen, gapExtend;
69 bool abort, probs, save;
71 int driver(linePair*, string, string, string);
72 void appendTaxFiles(string, string);
73 int createProcesses(string, string, string);
74 string addUnclassifieds(string, int);
76 int MPIReadNamesFile(string);
78 int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);