]> git.donarmstrong.com Git - mothur.git/blob - chimerauchimecommand.h
1f86a98973ba8c88c20de4678866a70db35efe05
[mothur.git] / chimerauchimecommand.h
1 #ifndef CHIMERAUCHIMECOMMAND_H
2 #define CHIMERAUCHIMECOMMAND_H
3
4
5 /*
6  *  chimerauchimecommand.h
7  *  Mothur
8  *
9  *  Created by westcott on 5/13/11.
10  *  Copyright 2011 Schloss Lab. All rights reserved.
11  *
12  */
13
14 #include "mothur.h"
15 #include "command.hpp"
16 #include "sequenceparser.h"
17
18 /***********************************************************/
19
20 class ChimeraUchimeCommand : public Command {
21 public:
22         ChimeraUchimeCommand(string);
23         ChimeraUchimeCommand();
24         ~ChimeraUchimeCommand() {}
25         
26         vector<string> setParameters();
27         string getCommandName()                 { return "chimera.uchime";              }
28         string getCommandCategory()             { return "Sequence Processing"; }
29         string getHelpString(); 
30         string getCitation() { return "uchime by Robert C. Edgar\nhttp://drive5.com/uchime\nThis code is donated to the public domain.\nhttp://www.mothur.org/wiki/Chimera.uchime\nEdgar,R.C., Haas,B.J., Clemente,J.C., Quince,C. and Knight,R. (2011), UCHIME improves sensitivity and speed of chimera detection, Bioinformatics, in press.\n"; }
31         string getDescription()         { return "detect chimeric sequences"; }
32         
33         int execute(); 
34         void help() { m->mothurOut(getHelpString()); }          
35         
36 private:
37         struct linePair {
38                 int start;
39                 int end;
40                 linePair(int i, int j) : start(i), end(j) {}
41         };
42         
43         vector<int> processIDS;   //processid
44         int driver(string, string, string, string, int&);
45         int createProcesses(string, string, string, string, int&);
46                 
47         bool abort, useAbskew, chimealns, useMinH, useMindiv, useXn, useDn, useXa, useChunks, useMinchunk, useIdsmoothwindow, useMinsmoothid, useMaxp, skipgaps, skipgaps2, useMinlen, useMaxlen, ucl, useQueryfract;
48         string fastafile, groupfile, templatefile, outputDir, namefile, abskew, minh, mindiv, xn, dn, xa, chunks, minchunk, idsmoothwindow, minsmoothid, maxp, minlen, maxlen, queryfract;
49         int processors;
50         
51         vector<string> outputNames;
52         vector<string> fastaFileNames;
53         vector<string> nameFileNames;
54         vector<string> groupFileNames;
55         
56         string getNamesFile(string&);
57         int readFasta(string, map<string, string>&);
58         int printFile(vector<seqPriorityNode>&, string);
59         int deconvoluteResults(SequenceParser&, string, string, string);
60         int driverGroups(SequenceParser&, string, string, string, string, int, int, vector<string>);
61         int createProcessesGroups(SequenceParser&, string, string, string, string, vector<string>);
62
63
64 };
65
66 /***********************************************************/
67
68 #endif
69
70