]> git.donarmstrong.com Git - mothur.git/blobdiff - trimseqscommand.h
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / trimseqscommand.h
index 11778fb9583f5af72b7def6c5ce421d59802dde5..137cb735719fba42f0d103af842de80c9930cc3e 100644 (file)
 #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(){}
        
-private:
+       vector<string> 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:
+       
+       GroupMap* groupMap;
+       
        struct linePair {
-               int start;
-               int num;
-               linePair(long int i, int j) : start(i), num(j) {}
+               unsigned long long start;
+               unsigned long long end;
+               linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
        };
-
-       void getOligos(vector<string>&);
-       bool stripQualThreshold(Sequence&, ifstream&);
-       bool cullQualAverage(Sequence&, ifstream&);
-       bool stripBarcode(Sequence&, int&);
-       bool stripForward(Sequence&);
-       bool stripReverse(Sequence&);
+       
+       bool getOligos(vector<vector<string> >&, vector<vector<string> >&, vector<vector<string> >&);
+       bool keepFirstTrim(Sequence&, QualityScores&);
+       bool removeLastTrim(Sequence&, QualityScores&);
        bool cullLength(Sequence&);
        bool cullHomoP(Sequence&);
        bool cullAmbigs(Sequence&);
-       bool compareDNASeq(string, string);
 
-       bool abort;
-       string fastaFile, oligoFile, qFileName, outputDir;
+       bool abort, createGroup;
+       string fastaFile, oligoFile, qFileName, groupfile, nameFile, outputDir;
        
        bool flip, allFiles, qtrim;
-       int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, qThreshold, qAverage, processors;
-       vector<string> forPrimer, revPrimer, outputNames;
+       int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts;
+       int qWindowSize, qWindowStep, keepFirst, removeLast;
+       double qRollAverage, qThreshold, qWindowAverage, qAverage;
+       vector<string> revPrimer, outputNames;
+       set<string> filesToRemove;
        map<string, int> barcodes;
        vector<string> groupVector;
-       
+       map<string, int> primers;
+       map<string, int> combos;
+       map<string, int> groupToIndex;
+       vector<string> primerNameVector;        //needed here?
+       vector<string> barcodeNameVector;       //needed here?
+       map<string, int> groupCounts;  
+       map<string, string> nameMap;
+
        vector<int> processIDS;   //processid
        vector<linePair*> lines;
        vector<linePair*> qLines;
        
-       int driverCreateTrim(string, string, string, string, string, vector<string>, linePair*, linePair*);     
-       int createProcessesCreateTrim(string, string, string, string, string, vector<string>);
-       int setLines(string, vector<linePair*>&);
-       
+       int driverCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >, linePair*, linePair*);  
+       int createProcessesCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >);
+       int setLines(string, string, vector<unsigned long long>&, vector<unsigned long long>&);
 };
 
 #endif