X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.h;h=13d1a417684bbf3b96d8a9d05c0bde2a2e22c544;hb=1bf53bca7e26bf091588bc8ca6e68cbfae1df6fe;hp=565d5283329124a65aca975d51a9588cb791670d;hpb=bffbd9ad0d837bc9523d95e7b35c34cfd2631046;p=mothur.git diff --git a/trimseqscommand.h b/trimseqscommand.h index 565d528..13d1a41 100644 --- a/trimseqscommand.h +++ b/trimseqscommand.h @@ -12,31 +12,76 @@ #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; + + struct linePair { + unsigned long int start; + unsigned long int end; + linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {} + }; + + bool getOligos(vector >&, 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, createGroup; + string fastaFile, oligoFile, qFileName, groupfile, nameFile, 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; + map nameMap; - int totalBarcodeCount, matchBarcodeCount; // to be removed - int totalFPrimerCount, matchFPrimerCount; // to be removed - int totalRPrimerCount, matchRPrimerCount; // to be removed + vector processIDS; //processid + vector lines; + vector qLines; - bool oligos, flip; - int numFPrimers, numRPrimers; - vector forPrimer, revPrimer; - map barcodes; + 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