]> git.donarmstrong.com Git - mothur.git/blob - trimflowscommand.h
5affc3fbdf7fedc366f7c8294c762e28681d7625
[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         string getDescription()         { return "trim.flows"; }
31
32         
33         int execute(); 
34         void help() { m->mothurOut(getHelpString()); }  
35         
36 private:
37         bool abort;
38
39         struct linePair {
40                 unsigned long int start;
41                 unsigned long int end;
42                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
43         };
44         int comboStarts;
45         vector<int> processIDS;   //processid
46         vector<linePair*> lines;
47
48         vector<unsigned long int> getFlowFileBreaks();
49         int createProcessesCreateTrim(string, string, string, string, vector<vector<string> >); 
50         int driverCreateTrim(string, string, string, string, vector<vector<string> >, linePair*);
51
52         vector<string> outputNames;
53         set<string> filesToRemove;
54         
55         void getOligos(vector<vector<string> >&);               //a rewrite of what is in trimseqscommand.h
56         int stripBarcode(Sequence&, int&);                              //largely redundant with trimseqscommand.h
57         int stripForward(Sequence&, int&);                              //largely redundant with trimseqscommand.h
58         bool stripReverse(Sequence&);                                   //largely redundant with trimseqscommand.h
59         bool compareDNASeq(string, string);                             //largely redundant with trimseqscommand.h
60         int countDiffs(string, string);                                 //largely redundant with trimseqscommand.h
61         
62         bool allFiles;
63         int processors;
64         int numFPrimers, numRPrimers;
65         int maxFlows, minFlows, minLength, maxLength, maxHomoP, tdiffs, bdiffs, pdiffs;
66         int numFlows;
67         float signal, noise;
68         bool fasta;
69         string flowOrder;       
70         
71         string flowFileName, oligoFileName, outputDir;
72
73
74         map<string, int> barcodes;
75         map<string, int> primers;
76         vector<string> revPrimer;
77
78         vector<string> primerNameVector;        //needed here?
79         vector<string> barcodeNameVector;       //needed here?
80
81         map<string, int> combos;                        //needed here?
82         map<string, int> groupToIndex;          //needed here?
83         
84 };
85
86
87 #endif