]> git.donarmstrong.com Git - mothur.git/blob - chimerapintailcommand.h
working on pam
[mothur.git] / chimerapintailcommand.h
1 #ifndef CHIMERAPINTAILCOMMAND_H
2 #define CHIMERAPINTAILCOMMAND_H
3
4 /*
5  *  chimerapintailcommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 4/1/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 "referencedb.h"
17
18 /***********************************************************/
19
20 class ChimeraPintailCommand : public Command {
21
22 public:
23
24         ChimeraPintailCommand(string);
25         ChimeraPintailCommand();
26         ~ChimeraPintailCommand(){}
27         
28         vector<string> setParameters();
29         string getCommandName()                 { return "chimera.pintail";             }
30         string getCommandCategory()             { return "Sequence Processing"; }
31         
32         string getHelpString(); 
33     string getOutputPattern(string);    
34         string getCitation() { return "Ashelford KE, Chuzhanova NA, Fry JC, Jones AJ, Weightman AJ (2005). At least 1 in 20 16S rRNA sequence records currently held in public repositories is estimated to contain substantial anomalies. Appl Environ Microbiol 71: 7724-36. \nAshelford KE, Chuzhanova NA, Fry JC, Jones AJ, Weightman AJ (2006). New screening software shows that most recent large 16S rRNA gene clone libraries contain chimeras. Appl Environ Microbiol 72: 5734-41. \nhttp://www.mothur.org/wiki/Chimera.pintail"; }
35         string getDescription()         { return "detect chimeric sequences"; }
36         
37         int execute(); 
38         void help() { m->mothurOut(getHelpString()); }          
39 private:
40         ReferenceDB* rdb;
41         
42         struct linePair {
43                 unsigned long long start;
44                 unsigned long long end;
45                 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
46         };
47
48         vector<int> processIDS;   //processid
49         vector<linePair*> lines;
50         
51         int driver(linePair*, string, string, string);
52         int createProcesses(string, string, string);
53         
54         #ifdef USE_MPI
55         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long long>&);
56         #endif
57
58         bool abort, filter, save;
59         string fastafile, templatefile, consfile, quanfile, maskfile, outputDir, inputDir;
60         int processors, window, increment, numSeqs, templateSeqsLength;
61         Chimera* chimera;
62         vector<string> outputNames;
63         vector<string> fastaFileNames;
64 };
65
66 /***********************************************************/
67
68 #endif
69
70