X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.h;h=d40cfe3c5604d66009ba22b568b0df71f3688faa;hb=69c7a1b20fbd9a1877a27fcdf18150405de9c087;hp=03ee1f5745222a1e3fb154c22b4099d26e77d029;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6;p=mothur.git diff --git a/trimseqscommand.h b/trimseqscommand.h index 03ee1f5..d40cfe3 100644 --- a/trimseqscommand.h +++ b/trimseqscommand.h @@ -12,35 +12,72 @@ #include "mothur.h" #include "command.hpp" -#include "globaldata.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: - void getOligos(); - bool stripBarcode(Sequence&, string&); - 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&); - - GlobalData* globaldata; - OptionParser* parser; - map parameters; - map::iterator it; + bool compareDNASeq(string, string); + int countDiffs(string, string); + map > outputTypes; + bool abort; - string fastafile; - bool oligos, flip; - int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength; - vector forPrimer, revPrimer; - map barcodes; + 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, 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