X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.h;h=2d0eabc1aa5a1504d23d1fc146f525504f3213f9;hb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6;hp=ee79d777a8d11ffaa2e279e69463314f9c3b8938;hpb=cd37904452dc95b183ff313ff05720c562902487;p=mothur.git diff --git a/trimseqscommand.h b/trimseqscommand.h index ee79d77..2d0eabc 100644 --- a/trimseqscommand.h +++ b/trimseqscommand.h @@ -13,34 +13,72 @@ #include "mothur.h" #include "command.hpp" #include "sequence.hpp" +#include "qualityscores.h" +#include "groupmap.h" class TrimSeqsCommand : public Command { public: TrimSeqsCommand(string); - ~TrimSeqsCommand(); - int execute(); - void help(); + TrimSeqsCommand(); + ~TrimSeqsCommand(){} + + vector setParameters(); + string getCommandName() { return "trim.seqs"; } + string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); + + int execute(); + void help() { m->mothurOut(getHelpString()); } private: - void getOligos(vector&, vector&); - bool stripQualThreshold(Sequence&, ifstream&); - bool cullQualAverage(Sequence&, ifstream&); - bool stripBarcode(Sequence&, int&); - bool stripForward(Sequence&); - bool stripReverse(Sequence&); + + GroupMap* groupMap; + + struct linePair { + unsigned long int start; + 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); bool abort; - string fastaFile, oligoFile, qFileName; + string fastaFile, oligoFile, qFileName, groupfile, outputDir; - bool flip, allFiles; - int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, qThreshold, qAverage; - vector forPrimer, revPrimer; + bool flip, allFiles, qtrim; + int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts; + int qWindowSize, qWindowStep, keepFirst, removeLast; + double qRollAverage, qThreshold, qWindowAverage, qAverage; + vector revPrimer, outputNames; + set filesToRemove; map barcodes; vector groupVector; + map primers; + map combos; + map groupToIndex; + vector primerNameVector; //needed here? + vector barcodeNameVector; //needed here? + map groupCounts; + + vector processIDS; //processid + vector lines; + vector qLines; + + 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, string, vector&, vector&); }; #endif