]> git.donarmstrong.com Git - mothur.git/blob - trimseqscommand.h
removed unused copy constructors and comments within comments that where causing...
[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, keepforward;
56         int numFPrimers, numRPrimers, numLinkers, numSpacers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, ldiffs, sdiffs, 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     vector<string>  linker;
65     vector<string>  spacer;
66         map<string, int> combos;
67         map<string, int> groupToIndex;
68         vector<string> primerNameVector;        //needed here?
69         vector<string> barcodeNameVector;       //needed here?
70         map<string, int> groupCounts;  
71         map<string, string> nameMap;
72
73         vector<int> processIDS;   //processid
74         vector<linePair*> lines;
75         vector<linePair*> qLines;
76         
77         int driverCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >, linePair*, linePair*);  
78         int createProcessesCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >);
79         int setLines(string, string, vector<unsigned long long>&, vector<unsigned long long>&);
80 };
81
82 #endif