]> git.donarmstrong.com Git - mothur.git/blob - chimeraccodecommand.h
Merge remote-tracking branch 'mothur/master'
[mothur.git] / chimeraccodecommand.h
1 #ifndef CHIMERACCODECOMMAND_H
2 #define CHIMERACCODECOMMAND_H
3
4 /*
5  *  chimeraccodecommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 3/30/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
20 class ChimeraCcodeCommand : public Command {
21 public:
22         ChimeraCcodeCommand(string);
23         ChimeraCcodeCommand();
24         ~ChimeraCcodeCommand(){}
25         
26         vector<string> setParameters();
27         string getCommandName()                 { return "chimera.ccode";               }
28         string getCommandCategory()             { return "Sequence Processing"; }
29         string getOutputFileNameTag(string, string);
30         string getHelpString(); 
31         string getCitation() { return "Gonzalez JM, Zimmermann J, Saiz-Jimenez C (2005). Evaluating putative chimeric sequences from PCR-amplified products. Bioinformatics 21: 333-7. \nhttp://www.mothur.org/wiki/Chimera.ccode"; }
32         string getDescription()         { return "detect chimeric sequences"; }
33         
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36         
37                 
38 private:
39         struct linePair {
40                 unsigned long long start;
41                 unsigned long long end;
42                 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
43         };
44         vector<int> processIDS;   //processid
45         vector<linePair*> lines;
46         
47         int driver(linePair*, string, string, string);
48         int createProcesses(string, string, string);
49         
50         #ifdef USE_MPI
51         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long long>&);
52         #endif
53
54         bool abort, filter, save;
55         string fastafile, templatefile, outputDir, maskfile;
56         int processors, window, numwanted, numSeqs, templateSeqsLength;
57         Chimera* chimera;
58         vector<string> fastaFileNames;
59         vector<string> outputNames;
60 };
61
62 /***********************************************************/
63
64 #endif
65