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"
16 #include "qualityscores.h"
18 class TrimSeqsCommand : public Command {
20 TrimSeqsCommand(string);
28 unsigned long int start;
30 linePair(unsigned long int i, int j) : start(i), num(j) {}
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);
44 string fastaFile, oligoFile, qFileName, outputDir;
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;
57 vector<int> processIDS; //processid
58 vector<linePair*> lines;
59 vector<linePair*> qLines;
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, vector<linePair*>&);