]> git.donarmstrong.com Git - mothur.git/blob - trimflowscommand.h
some changes to 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         struct linePair {
35                 unsigned long int start;
36                 unsigned long int end;
37                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
38         };
39         int comboStarts;
40         vector<int> processIDS;   //processid
41         vector<linePair*> lines;
42
43         vector<unsigned long int> getFlowFileBreaks();
44         int createProcessesCreateTrim(string, string, string, string, vector<vector<string> >); 
45         int driverCreateTrim(string, string, string, string, vector<vector<string> >, linePair*);
46
47         
48         map<string, vector<string> > outputTypes;
49         vector<string> outputNames;
50         set<string> filesToRemove;
51         
52         
53         
54         void getOligos(vector<vector<string> >&);               //a rewrite of what is in trimseqscommand.h
55         int stripBarcode(Sequence&, int&);                              //largely redundant with trimseqscommand.h
56         int stripForward(Sequence&, int&);                              //largely redundant with trimseqscommand.h
57         bool stripReverse(Sequence&);                                   //largely redundant with trimseqscommand.h
58         bool compareDNASeq(string, string);                             //largely redundant with trimseqscommand.h
59         int countDiffs(string, string);                                 //largely redundant with trimseqscommand.h
60         
61         bool allFiles;
62         int processors;
63         int numFPrimers, numRPrimers;
64         int maxFlows, minFlows, minLength, maxLength, maxHomoP, tdiffs, bdiffs, pdiffs;
65         int numFlows;
66         float signal, noise;
67         bool fasta;
68         string flowOrder;       
69         
70         string flowFileName, oligoFileName, outputDir;
71
72
73         map<string, int> barcodes;
74         map<string, int> primers;
75         vector<string> revPrimer;
76
77         vector<string> primerNameVector;        //needed here?
78         vector<string> barcodeNameVector;       //needed here?
79
80         map<string, int> combos;                        //needed here?
81         map<string, int> groupToIndex;          //needed here?
82         
83 };
84
85
86 #endif