]> git.donarmstrong.com Git - mothur.git/blob - trimseqscommand.h
modified trim.seqs to split by primer name if primer name is given, and warn if dupli...
[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
17 class TrimSeqsCommand : public Command {
18 public:
19         TrimSeqsCommand(string);
20         ~TrimSeqsCommand();
21         int execute();
22         void help();
23         
24 private:
25
26         struct linePair {
27                 int start;
28                 int num;
29                 linePair(long int i, int j) : start(i), num(j) {}
30         };
31
32         void getOligos(vector<string>&);
33         bool stripQualThreshold(Sequence&, ifstream&);
34         bool cullQualAverage(Sequence&, ifstream&);
35         int stripBarcode(Sequence&, int&);
36         int stripForward(Sequence&, int&);
37         bool stripReverse(Sequence&);
38         bool cullLength(Sequence&);
39         bool cullHomoP(Sequence&);
40         bool cullAmbigs(Sequence&);
41         bool compareDNASeq(string, string);
42         int countDiffs(string, string);//, int, int&, int);
43
44         bool abort;
45         string fastaFile, oligoFile, qFileName, outputDir;
46         
47         bool flip, allFiles, qtrim;
48         int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, qThreshold, qAverage, processors, tdiffs, bdiffs, pdiffs, comboStarts;
49         vector<string> revPrimer, outputNames;
50         map<string, int> barcodes;
51         vector<string> groupVector;
52         map<string, int> primers;
53         map<string, int> combos;
54         
55         vector<int> processIDS;   //processid
56         vector<linePair*> lines;
57         vector<linePair*> qLines;
58         
59         int driverCreateTrim(string, string, string, string, string, vector<string>, linePair*, linePair*);     
60         int createProcessesCreateTrim(string, string, string, string, string, vector<string>);
61         int setLines(string, vector<linePair*>&);
62         
63 };
64
65 #endif