]> git.donarmstrong.com Git - mothur.git/blob - parsefastaqcommand.h
update .gitignore
[mothur.git] / parsefastaqcommand.h
1 #ifndef PARSEFASTAQCOMMAND_H
2 #define PARSEFASTAQCOMMAND_H
3
4 /*
5  *  parsefastaqcommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 9/30/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 #include "command.hpp"
15 #include "trimoligos.h"
16 #include "sequence.hpp"
17 #include "groupmap.h"
18 #include "oligos.h"
19
20 struct fastqRead2 {
21     string quality;
22         Sequence seq;
23     string wholeRead;
24         
25         fastqRead2() {  };
26         fastqRead2(Sequence s, string q, string w) : seq(s), quality(q), wholeRead(w){};
27         ~fastqRead2() {};
28 };
29
30
31 class ParseFastaQCommand : public Command {
32
33 public:
34         ParseFastaQCommand(string);
35         ParseFastaQCommand();
36         ~ParseFastaQCommand() {}
37         
38         vector<string> setParameters();
39         string getCommandName()                 { return "fastq.info";          }
40         string getCommandCategory()             { return "Sequence Processing"; }
41         
42         string getHelpString(); 
43     string getOutputPattern(string);    
44         string getCitation() { return "http://www.mothur.org/wiki/Parse.fastq"; }
45         string getDescription()         { return "reads a fastq file and creates a fasta and quality file"; }
46
47         
48         int execute(); 
49         void help() { m->mothurOut(getHelpString()); }          
50 private:
51
52         vector<string> outputNames;     
53         string outputDir, fastaQFile, format, oligosfile, groupfile;
54         bool abort, fasta, qual, pacbio, pairedOligos, reorient;
55     int pdiffs, bdiffs, ldiffs, sdiffs, tdiffs, split, numBarcodes, numPrimers, numLinkers, numSpacers, numRPrimers;
56     GroupMap* groupMap;
57     Oligos oligos;
58     
59     vector<vector<string> > fastqFileNames;
60     string noMatchFile;
61         
62         vector<int> convertQual(string);
63     vector<char> convertTable;
64     bool readOligos(string oligosFile);
65     bool readGroup(string oligosFile);
66     fastqRead2 readFastq(ifstream&, bool&);
67     int findGroup(fastqRead2, int&, int&, TrimOligos*&, TrimOligos*&, int, int);
68     int findGroup(fastqRead2, int&, int&, string);
69     
70 };
71
72 #endif
73
74