X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.h;h=137cb735719fba42f0d103af842de80c9930cc3e;hb=8dd3c225255d7084e3aff8740aa4f1f1cabb367a;hp=0a34ff303e618839e3fd80583e91f9ab10305ff8;hpb=64eee3a595ae53817f52807d7393b22e74e31f56;p=mothur.git diff --git a/trimseqscommand.h b/trimseqscommand.h index 0a34ff3..137cb73 100644 --- a/trimseqscommand.h +++ b/trimseqscommand.h @@ -12,33 +12,69 @@ #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(); - int execute(); + ~TrimSeqsCommand(){} + + vector setParameters(); + string getCommandName() { return "trim.seqs"; } + string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); + string getCitation() { return "http://www.mothur.org/wiki/Trim.seqs"; } + string getDescription() { return "provides the preprocessing features needed to screen and sort pyrosequences"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } private: - void getOligos(); - bool stripBarcode(Sequence&, string&); - bool stripForward(Sequence&); - bool stripReverse(Sequence&); - GlobalData* globaldata; + GroupMap* groupMap; - int totalBarcodeCount, matchBarcodeCount; - int totalFPrimerCount, matchFPrimerCount; - int totalRPrimerCount, matchRPrimerCount; + struct linePair { + unsigned long long start; + unsigned long long end; + linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {} + }; + bool getOligos(vector >&, vector >&, vector >&); + bool keepFirstTrim(Sequence&, QualityScores&); + bool removeLastTrim(Sequence&, QualityScores&); + bool cullLength(Sequence&); + bool cullHomoP(Sequence&); + bool cullAmbigs(Sequence&); + + bool abort, createGroup; + string fastaFile, oligoFile, qFileName, groupfile, nameFile, outputDir; - bool oligos, flip; - int forwardPrimerMismatch, reversePrimerMismatch, barcodeMismatch; - int numFPrimers, numRPrimers; - vector forPrimer, revPrimer; - map barcodes; + 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; + map nameMap; + vector processIDS; //processid + vector lines; + vector qLines; + + int driverCreateTrim(string, string, string, string, string, string, string, string, string, vector >, vector >, vector >, linePair*, linePair*); + int createProcessesCreateTrim(string, string, string, string, string, string, string, string, string, vector >, vector >, vector >); + int setLines(string, string, vector&, vector&); }; #endif