]> git.donarmstrong.com Git - mothur.git/blob - chimeracheckcommand.h
Merge remote-tracking branch 'mothur/master'
[mothur.git] / chimeracheckcommand.h
1 #ifndef CHIMERACHECKCOMMAND_H
2 #define CHIMERACHECKCOMMAND_H
3
4 /*
5  *  chimeracheckcommand.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 #include "chimeracheckrdp.h"
17
18
19 /***********************************************************/
20
21 class ChimeraCheckCommand : public Command {
22 public:
23         ChimeraCheckCommand(string);
24         ChimeraCheckCommand();
25         ~ChimeraCheckCommand(){}
26         
27         vector<string> setParameters();
28         string getCommandName()                 { return "chimera.check";               }
29         string getCommandCategory()             { return "Sequence Processing"; }
30         string getOutputFileNameTag(string, string);
31         string getHelpString(); 
32         string getCitation() { return "CHIMERA_CHECK version 2.7 written by Niels Larsen (http://wdcm.nig.ac.jp/RDP/docs/chimera_doc.html) \nhttp://www.mothur.org/wiki/Chimera.check"; }
33         string getDescription()         { return "detect chimeric sequences"; }
34         
35         int execute(); 
36         void help() { m->mothurOut(getHelpString()); }  
37         
38         
39 private:
40
41         struct linePair {
42                 unsigned long long start;
43                 unsigned long long end;
44                 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
45         };
46
47         vector<int> processIDS;   //processid
48         vector<linePair*> lines;
49         
50         int driver(linePair*, string, string);
51         int createProcesses(string, string);
52                 
53         #ifdef USE_MPI
54         int driverMPI(int, int, MPI_File&, MPI_File&, vector<unsigned long long>&);
55         #endif
56
57         bool abort, svg, save;
58         string fastafile, templatefile, namefile, outputDir;
59         int processors, increment, ksize, numSeqs, templateSeqsLength;
60         Chimera* chimera;
61         vector<string> fastaFileNames;
62         vector<string> nameFileNames;
63         vector<string> outputNames;
64 };
65
66 /***********************************************************/
67
68 #endif
69
70