X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.h;h=e4c2e0b6748eb6c795c8a171e1f1e8a6fb380f6f;hb=d635b39347cd81943ea50de7b813a0a5d743b0c0;hp=a904a10b683ce3fd04784e9ac1a60d02e293c368;hpb=0fb6d165c8dc8dc7153a101513a05f457431d0bc;p=mothur.git diff --git a/trimseqscommand.h b/trimseqscommand.h index a904a10..e4c2e0b 100644 --- a/trimseqscommand.h +++ b/trimseqscommand.h @@ -14,38 +14,51 @@ #include "command.hpp" #include "sequence.hpp" #include "qualityscores.h" +#include "groupmap.h" class TrimSeqsCommand : public Command { public: TrimSeqsCommand(string); + TrimSeqsCommand(); ~TrimSeqsCommand(); + vector getRequiredParameters(); + vector getValidParameters(); + vector getRequiredFiles(); + map > getOutputFiles() { return outputTypes; } int execute(); void help(); private: - + + GroupMap* groupMap; + struct linePair { unsigned long int start; - int num; - linePair(unsigned long int i, int j) : start(i), num(j) {} + unsigned long int end; + linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {} }; - + void getOligos(vector&, vector&); int stripBarcode(Sequence&, QualityScores&, int&); int stripForward(Sequence&, QualityScores&, int&); bool stripReverse(Sequence&, QualityScores&); + + bool keepFirstTrim(Sequence&, QualityScores&); + bool removeLastTrim(Sequence&, QualityScores&); + bool cullLength(Sequence&); bool cullHomoP(Sequence&); bool cullAmbigs(Sequence&); bool compareDNASeq(string, string); int countDiffs(string, string); + map > outputTypes; bool abort; - string fastaFile, oligoFile, qFileName, outputDir; + string fastaFile, oligoFile, qFileName, groupfile, outputDir; bool flip, allFiles, qtrim; int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts; - int qWindowSize, qWindowStep; + int qWindowSize, qWindowStep, keepFirst, removeLast; double qRollAverage, qThreshold, qWindowAverage, qAverage; vector revPrimer, outputNames; set filesToRemove; @@ -53,6 +66,7 @@ private: vector groupVector; map primers; map combos; + map groupToIndex; vector processIDS; //processid vector lines; @@ -60,8 +74,7 @@ private: int driverCreateTrim(string, string, string, string, string, string, string, vector, vector, linePair*, linePair*); int createProcessesCreateTrim(string, string, string, string, string, string, string, vector, vector); - int setLines(string, vector&); - + int setLines(string, string, vector&, vector&); }; #endif