]> git.donarmstrong.com Git - mothur.git/blob - trimseqscommand.h
added group option to trim.seqs so you can provide your own groupfile instead of...
[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 #include "groupmap.h"
18
19 class TrimSeqsCommand : public Command {
20 public:
21         TrimSeqsCommand(string);
22         TrimSeqsCommand();
23         ~TrimSeqsCommand();
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         
33         GroupMap* groupMap;
34         
35         struct linePair {
36                 unsigned long int start;
37                 unsigned long int end;
38                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
39         };
40
41         void getOligos(vector<string>&, vector<string>&);
42         int stripBarcode(Sequence&, QualityScores&, int&);
43         int stripForward(Sequence&, QualityScores&, int&);
44         bool stripReverse(Sequence&, QualityScores&);
45         bool cullLength(Sequence&);
46         bool cullHomoP(Sequence&);
47         bool cullAmbigs(Sequence&);
48         bool compareDNASeq(string, string);
49         int countDiffs(string, string);
50         map<string, vector<string> > outputTypes;
51
52         bool abort;
53         string fastaFile, oligoFile, qFileName, groupfile, outputDir;
54         
55         bool flip, allFiles, qtrim;
56         int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts;
57         int qWindowSize, qWindowStep;
58         double qRollAverage, qThreshold, qWindowAverage, qAverage;
59         vector<string> revPrimer, outputNames;
60         set<string> filesToRemove;
61         map<string, int> barcodes;
62         vector<string> groupVector;
63         map<string, int> primers;
64         map<string, int> combos;
65         map<string, int> groupToIndex;
66         
67         vector<int> processIDS;   //processid
68         vector<linePair*> lines;
69         vector<linePair*> qLines;
70         
71         int driverCreateTrim(string, string, string, string, string, string, string, vector<string>, vector<string>, linePair*, linePair*);     
72         int createProcessesCreateTrim(string, string, string, string, string, string, string, vector<string>, vector<string>);
73         int setLines(string, string, vector<unsigned long int>&, vector<unsigned long int>&);
74         
75 };
76
77 #endif