]> git.donarmstrong.com Git - mothur.git/blob - trimflowscommand.h
added citation function to commands
[mothur.git] / trimflowscommand.h
1 #ifndef TRIMFLOWSCOMMAND_H
2 #define TRIMFLOWSCOMMAND_H
3
4 /*
5  *  trimflowscommand.h
6  *  Mothur
7  *
8  *  Created by Pat Schloss on 12/22/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "sequence.hpp"
16 #include "flowdata.h"
17 #include "groupmap.h"
18
19 class TrimFlowsCommand : public Command {
20 public:
21         TrimFlowsCommand(string);
22         TrimFlowsCommand();
23         ~TrimFlowsCommand() {}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "trim.flows";  }
27         string getCommandCategory()             { return "Hidden";              }
28         string getHelpString(); 
29         string getCitation() { return "no citation"; }
30         
31         int execute(); 
32         void help() { m->mothurOut(getHelpString()); }  
33         
34 private:
35         bool abort;
36
37         struct linePair {
38                 unsigned long int start;
39                 unsigned long int end;
40                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
41         };
42         int comboStarts;
43         vector<int> processIDS;   //processid
44         vector<linePair*> lines;
45
46         vector<unsigned long int> getFlowFileBreaks();
47         int createProcessesCreateTrim(string, string, string, string, vector<vector<string> >); 
48         int driverCreateTrim(string, string, string, string, vector<vector<string> >, linePair*);
49
50         vector<string> outputNames;
51         set<string> filesToRemove;
52         
53         void getOligos(vector<vector<string> >&);               //a rewrite of what is in trimseqscommand.h
54         int stripBarcode(Sequence&, int&);                              //largely redundant with trimseqscommand.h
55         int stripForward(Sequence&, int&);                              //largely redundant with trimseqscommand.h
56         bool stripReverse(Sequence&);                                   //largely redundant with trimseqscommand.h
57         bool compareDNASeq(string, string);                             //largely redundant with trimseqscommand.h
58         int countDiffs(string, string);                                 //largely redundant with trimseqscommand.h
59         
60         bool allFiles;
61         int processors;
62         int numFPrimers, numRPrimers;
63         int maxFlows, minFlows, minLength, maxLength, maxHomoP, tdiffs, bdiffs, pdiffs;
64         int numFlows;
65         float signal, noise;
66         bool fasta;
67         string flowOrder;       
68         
69         string flowFileName, oligoFileName, outputDir;
70
71
72         map<string, int> barcodes;
73         map<string, int> primers;
74         vector<string> revPrimer;
75
76         vector<string> primerNameVector;        //needed here?
77         vector<string> barcodeNameVector;       //needed here?
78
79         map<string, int> combos;                        //needed here?
80         map<string, int> groupToIndex;          //needed here?
81         
82 };
83
84
85 #endif