]> git.donarmstrong.com Git - mothur.git/blob - trimseqscommand.h
93e8c776918ec9fa2d6f661d7c178380a4f47d66
[mothur.git] / trimseqscommand.h
1 #ifndef TRIMSEQSCOMMAND_H
2 #define TRIMSEQSCOMMAND_H
3
4 /*
5  *  trimseqscommand.h
6  *  Mothur
7  *
8  *  Created by Pat Schloss on 6/6/09.
9  *  Copyright 2009 Patrick D. Schloss. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "sequence.hpp"
16 #include "qualityscores.h"
17
18 class TrimSeqsCommand : public Command {
19 public:
20         TrimSeqsCommand(string);
21         ~TrimSeqsCommand();
22         int execute();
23         void help();
24         
25 private:
26
27         struct linePair {
28                 unsigned long int start;
29                 unsigned long int end;
30                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
31         };
32
33         void getOligos(vector<string>&, vector<string>&);
34         int stripBarcode(Sequence&, QualityScores&, int&);
35         int stripForward(Sequence&, QualityScores&, int&);
36         bool stripReverse(Sequence&, QualityScores&);
37         bool cullLength(Sequence&);
38         bool cullHomoP(Sequence&);
39         bool cullAmbigs(Sequence&);
40         bool compareDNASeq(string, string);
41         int countDiffs(string, string);
42
43         bool abort;
44         string fastaFile, oligoFile, qFileName, outputDir;
45         
46         bool flip, allFiles, qtrim;
47         int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts;
48         int qWindowSize, qWindowStep;
49         double qRollAverage, qThreshold, qWindowAverage, qAverage;
50         vector<string> revPrimer, outputNames;
51         set<string> filesToRemove;
52         map<string, int> barcodes;
53         vector<string> groupVector;
54         map<string, int> primers;
55         map<string, int> combos;
56         
57         vector<int> processIDS;   //processid
58         vector<linePair*> lines;
59         vector<linePair*> qLines;
60         
61         int driverCreateTrim(string, string, string, string, string, string, string, vector<string>, vector<string>, linePair*, linePair*);     
62         int createProcessesCreateTrim(string, string, string, string, string, string, string, vector<string>, vector<string>);
63         int setLines(string, string, vector<unsigned long int>&, vector<unsigned long int>&);
64         
65 };
66
67 #endif