]> git.donarmstrong.com Git - mothur.git/blob - trimflowscommand.h
addition of trim.flows
[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         vector<string> getRequiredParameters();
25         vector<string> getValidParameters();
26         vector<string> getRequiredFiles();
27         map<string, vector<string> > getOutputFiles() { return outputTypes; }
28         int execute();
29         void help();
30         
31 private:
32         bool abort;
33
34 //      GroupMap* groupMap;
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         vector<linePair*> qLines;
45         map<string, vector<string> > outputTypes;
46         vector<string> outputNames;
47         set<string> filesToRemove;
48
49         
50         
51         void getOligos(vector<vector<string> >&);               //a rewrite of what is in trimseqscommand.h
52         int stripBarcode(Sequence&, int&);                              //largely redundant with trimseqscommand.h
53         int stripForward(Sequence&, int&);                              //largely redundant with trimseqscommand.h
54         bool stripReverse(Sequence&);                                   //largely redundant with trimseqscommand.h
55         bool compareDNASeq(string, string);                             //largely redundant with trimseqscommand.h
56         int countDiffs(string, string);                                 //largely redundant with trimseqscommand.h
57
58         
59         bool allFiles;
60 //      int processors;
61         int numFPrimers, numRPrimers;
62         int totalFlows, minFlows, minLength, maxLength, maxHomoP, tdiffs, bdiffs, pdiffs;
63         float signal, noise;
64         bool fasta;
65         
66         
67         string flowFileName, oligoFileName, outputDir;
68
69
70         map<string, int> barcodes;
71         map<string, int> primers;
72         vector<string> revPrimer;
73
74         vector<string> primerNameVector;        //needed here?
75         vector<string> barcodeNameVector;       //needed here?
76
77         map<string, int> combos;                        //needed here?
78         map<string, int> groupToIndex;          //needed here?
79         
80         
81         int driverCreateTrim(string, string, string, string);
82         
83 //      int createProcessesCreateTrim(string, string, string, string, string, string, string, vector<string>, vector<string>){};
84         int setLines(string, string, vector<unsigned long int>&, vector<unsigned long int>&){};
85         
86 };
87
88
89 #endif