]> git.donarmstrong.com Git - mothur.git/blob - chimeraslayercommand.h
finished chimera.slayer template=self change
[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         
30         int execute(); 
31         void help() { m->mothurOut(getHelpString()); }          
32         
33 private:
34
35         struct linePair {
36                 unsigned long int start;
37                 unsigned long int end;
38                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
39         };
40
41         vector<int> processIDS;   //processid
42         vector<linePair*> lines;
43         
44         int driver(linePair*, string, string, string, string);
45         int createProcesses(string, string, string, string);
46         int divideInHalf(Sequence, string&, string&);
47         map<string, int> sortFastaFile(string, string);
48                 
49         #ifdef USE_MPI
50         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
51         #endif
52
53         bool abort, realign, trim, trimera;
54         string fastafile, templatefile, outputDir, search, namefile;
55         int processors, window, iters, increment, numwanted, ksize, match, mismatch, parents, minSimilarity, minCoverage, minBS, minSNP, numSeqs, templateSeqsLength;
56         float divR;
57         Chimera* chimera;
58         
59         vector<string> outputNames;
60         vector<string> fastaFileNames;
61         vector<string> nameFileNames;
62         
63 };
64
65 /***********************************************************/
66
67 #endif
68
69