]> git.donarmstrong.com Git - mothur.git/blob - trimflowscommand.h
incorporation of nast-ier code / removed a cout
[mothur.git] / trimflowscommand.h
1 #ifndef TRIMFLOWSCOMMAND_H
2 #define TRIMFLOWSCOMMAND_H
3
4 /*
5  *  trimflowscommand.h
6  *  Mothur
7  *
8  *  Created by Pat Schloss on 12/22/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "sequence.hpp"
16 #include "flowdata.h"
17 #include "groupmap.h"
18
19 class TrimFlowsCommand : public Command {
20 public:
21         TrimFlowsCommand(string);
22         TrimFlowsCommand();
23         ~TrimFlowsCommand() {}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "trim.flows";  }
27         string getCommandCategory()             { return "Hidden";              }
28         string getHelpString(); 
29         
30         int execute(); 
31         void help() { m->mothurOut(getHelpString()); }  
32         
33 private:
34         bool abort;
35
36         struct linePair {
37                 unsigned long int start;
38                 unsigned long int end;
39                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
40         };
41         int comboStarts;
42         vector<int> processIDS;   //processid
43         vector<linePair*> lines;
44
45         vector<unsigned long int> getFlowFileBreaks();
46         int createProcessesCreateTrim(string, string, string, string, vector<vector<string> >); 
47         int driverCreateTrim(string, string, string, string, vector<vector<string> >, linePair*);
48
49         vector<string> outputNames;
50         set<string> filesToRemove;
51         
52         void getOligos(vector<vector<string> >&);               //a rewrite of what is in trimseqscommand.h
53         int stripBarcode(Sequence&, int&);                              //largely redundant with trimseqscommand.h
54         int stripForward(Sequence&, int&);                              //largely redundant with trimseqscommand.h
55         bool stripReverse(Sequence&);                                   //largely redundant with trimseqscommand.h
56         bool compareDNASeq(string, string);                             //largely redundant with trimseqscommand.h
57         int countDiffs(string, string);                                 //largely redundant with trimseqscommand.h
58         
59         bool allFiles;
60         int processors;
61         int numFPrimers, numRPrimers;
62         int maxFlows, minFlows, minLength, maxLength, maxHomoP, tdiffs, bdiffs, pdiffs;
63         int numFlows;
64         float signal, noise;
65         bool fasta;
66         string flowOrder;       
67         
68         string flowFileName, oligoFileName, outputDir;
69
70
71         map<string, int> barcodes;
72         map<string, int> primers;
73         vector<string> revPrimer;
74
75         vector<string> primerNameVector;        //needed here?
76         vector<string> barcodeNameVector;       //needed here?
77
78         map<string, int> combos;                        //needed here?
79         map<string, int> groupToIndex;          //needed here?
80         
81 };
82
83
84 #endif