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"
19 class TrimSeqsCommand : public Command {
21 TrimSeqsCommand(string);
25 vector<string> setParameters();
26 string getCommandName() { return "trim.seqs"; }
27 string getCommandCategory() { return "Sequence Processing"; }
28 string getHelpString();
31 void help() { m->mothurOut(getHelpString()); }
38 unsigned long int start;
39 unsigned long int end;
40 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
43 void getOligos(vector<vector<string> >&, vector<vector<string> >&);
44 int stripBarcode(Sequence&, QualityScores&, int&);
45 int stripForward(Sequence&, QualityScores&, int&);
46 bool stripReverse(Sequence&, QualityScores&);
48 bool keepFirstTrim(Sequence&, QualityScores&);
49 bool removeLastTrim(Sequence&, QualityScores&);
51 bool cullLength(Sequence&);
52 bool cullHomoP(Sequence&);
53 bool cullAmbigs(Sequence&);
54 bool compareDNASeq(string, string);
55 int countDiffs(string, string);
58 string fastaFile, oligoFile, qFileName, groupfile, outputDir;
60 bool flip, allFiles, qtrim;
61 int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts;
62 int qWindowSize, qWindowStep, keepFirst, removeLast;
63 double qRollAverage, qThreshold, qWindowAverage, qAverage;
64 vector<string> revPrimer, outputNames;
65 set<string> filesToRemove;
66 map<string, int> barcodes;
67 vector<string> groupVector;
68 map<string, int> primers;
69 map<string, int> combos;
70 map<string, int> groupToIndex;
71 vector<string> primerNameVector; //needed here?
72 vector<string> barcodeNameVector; //needed here?
73 map<string, int> groupCounts;
75 vector<int> processIDS; //processid
76 vector<linePair*> lines;
77 vector<linePair*> qLines;
79 int driverCreateTrim(string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, linePair*, linePair*);
80 int createProcessesCreateTrim(string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >);
81 int setLines(string, string, vector<unsigned long int>&, vector<unsigned long int>&);