1 #ifndef TRIMSEQSCOMMAND_H
2 #define TRIMSEQSCOMMAND_H
8 * Created by Pat Schloss on 6/6/09.
9 * Copyright 2009 Patrick D. Schloss. All rights reserved.
14 #include "command.hpp"
15 #include "sequence.hpp"
17 class TrimSeqsCommand : public Command {
19 TrimSeqsCommand(string);
29 linePair(long int i, int j) : start(i), num(j) {}
32 void getOligos(vector<string>&);
33 bool stripQualThreshold(Sequence&, ifstream&);
34 bool cullQualAverage(Sequence&, ifstream&);
35 bool stripBarcode(Sequence&, int&);
36 bool stripForward(Sequence&);
37 bool stripReverse(Sequence&);
38 bool cullLength(Sequence&);
39 bool cullHomoP(Sequence&);
40 bool cullAmbigs(Sequence&);
41 bool compareDNASeq(string, string);
42 bool compareDNASeq(string, string, int, int&);
45 string fastaFile, oligoFile, qFileName, outputDir;
47 bool flip, allFiles, qtrim;
48 int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, qThreshold, qAverage, processors, diffs;
49 vector<string> forPrimer, revPrimer, outputNames;
50 map<string, int> barcodes;
51 vector<string> groupVector;
53 vector<int> processIDS; //processid
54 vector<linePair*> lines;
55 vector<linePair*> qLines;
57 int driverCreateTrim(string, string, string, string, string, vector<string>, linePair*, linePair*);
58 int createProcessesCreateTrim(string, string, string, string, string, vector<string>);
59 int setLines(string, vector<linePair*>&);