]> git.donarmstrong.com Git - mothur.git/blob - chimeraslayercommand.h
added blastlocation to chimera.slayer and fixed issue with clearcut getting current...
[mothur.git] / chimeraslayercommand.h
1 #ifndef CHIMERASLAYERCOMMAND_H
2 #define CHIMERASLAYERCOMMAND_H
3
4 /*
5  *  chimeraslayercommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 3/31/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "chimera.h"
16
17 /***********************************************************/
18
19 class ChimeraSlayerCommand : public Command {
20 public:
21         ChimeraSlayerCommand(string);
22         ChimeraSlayerCommand();
23         ~ChimeraSlayerCommand() {}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "chimera.slayer";              }
27         string getCommandCategory()             { return "Sequence Processing"; }
28         string getHelpString(); 
29         string getCitation() { return "Haas BJ, Gevers D, Earl A, Feldgarden M, Ward DV, Giannokous G, Ciulla D, Tabbaa D, Highlander SK, Sodergren E, Methe B, Desantis TZ, Petrosino JF, Knight R, Birren BW (2011). Chimeric 16S rRNA sequence formation and detection in Sanger and 454-pyrosequenced PCR amplicons. Genome Res. \nhttp://www.mothur.org/wiki/Chimera.slayer"; }
30         string getDescription()         { return "detect chimeric sequences"; }
31         
32         int execute(); 
33         void help() { m->mothurOut(getHelpString()); }          
34         
35 private:
36
37         struct linePair {
38                 unsigned long int start;
39                 unsigned long int end;
40                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
41         };
42
43         vector<int> processIDS;   //processid
44         vector<linePair*> lines;
45         
46         int driver(linePair*, string, string, string, string);
47         int createProcesses(string, string, string, string);
48         int divideInHalf(Sequence, string&, string&);
49         map<string, int> sortFastaFile(string, string);
50                 
51         #ifdef USE_MPI
52         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
53         #endif
54
55         bool abort, realign, trim, trimera, save;
56         string fastafile, templatefile, outputDir, search, namefile, blastlocation;
57         int processors, window, iters, increment, numwanted, ksize, match, mismatch, parents, minSimilarity, minCoverage, minBS, minSNP, numSeqs, templateSeqsLength;
58         float divR;
59         Chimera* chimera;
60         
61         vector<string> outputNames;
62         vector<string> fastaFileNames;
63         vector<string> nameFileNames;
64         
65 };
66
67 /***********************************************************/
68
69 #endif
70
71