]> git.donarmstrong.com Git - mothur.git/blob - trimseqscommand.h
finished added bygroup processing of chimeras in chimera.slayer and chimera.uchime...
[mothur.git] / trimseqscommand.h
1 #ifndef TRIMSEQSCOMMAND_H
2 #define TRIMSEQSCOMMAND_H
3
4 /*
5  *  trimseqscommand.h
6  *  Mothur
7  *
8  *  Created by Pat Schloss on 6/6/09.
9  *  Copyright 2009 Patrick D. Schloss. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "sequence.hpp"
16 #include "qualityscores.h"
17 #include "groupmap.h"
18
19 class TrimSeqsCommand : public Command {
20 public:
21         TrimSeqsCommand(string);
22         TrimSeqsCommand();
23         ~TrimSeqsCommand(){}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "trim.seqs";   }
27         string getCommandCategory()             { return "Sequence Processing";         }
28         string getHelpString(); 
29         string getCitation() { return "http://www.mothur.org/wiki/Trim.seqs"; }
30         string getDescription()         { return "provides the preprocessing features needed to screen and sort pyrosequences"; }
31
32         int execute(); 
33         void help() { m->mothurOut(getHelpString()); }  
34         
35 private:
36         
37         GroupMap* groupMap;
38         
39         struct linePair {
40                 unsigned long long start;
41                 unsigned long long end;
42                 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
43         };
44         
45         bool getOligos(vector<vector<string> >&, vector<vector<string> >&, vector<vector<string> >&);
46         bool keepFirstTrim(Sequence&, QualityScores&);
47         bool removeLastTrim(Sequence&, QualityScores&);
48         bool cullLength(Sequence&);
49         bool cullHomoP(Sequence&);
50         bool cullAmbigs(Sequence&);
51
52         bool abort, createGroup;
53         string fastaFile, oligoFile, qFileName, groupfile, nameFile, outputDir;
54         
55         bool flip, allFiles, qtrim;
56         int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts;
57         int qWindowSize, qWindowStep, keepFirst, removeLast;
58         double qRollAverage, qThreshold, qWindowAverage, qAverage;
59         vector<string> revPrimer, outputNames;
60         set<string> filesToRemove;
61         map<string, int> barcodes;
62         vector<string> groupVector;
63         map<string, int> primers;
64         map<string, int> combos;
65         map<string, int> groupToIndex;
66         vector<string> primerNameVector;        //needed here?
67         vector<string> barcodeNameVector;       //needed here?
68         map<string, int> groupCounts;  
69         map<string, string> nameMap;
70
71         vector<int> processIDS;   //processid
72         vector<linePair*> lines;
73         vector<linePair*> qLines;
74         
75         int driverCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >, linePair*, linePair*);  
76         int createProcessesCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >);
77         int setLines(string, string, vector<unsigned long long>&, vector<unsigned long long>&);
78 };
79
80 #endif