]> git.donarmstrong.com Git - mothur.git/blob - mergesfffilecommand.h
fixes while testing 1.33.0
[mothur.git] / mergesfffilecommand.h
1 //
2 //  mergesfffilecommand.h
3 //  Mothur
4 //
5 //  Created by Sarah Westcott on 1/31/14.
6 //  Copyright (c) 2014 Schloss Lab. All rights reserved.
7 //
8
9 #ifndef Mothur_mergesfffilecommand_h
10 #define Mothur_mergesfffilecommand_h
11
12 #include "command.hpp"
13
14
15 /**********************************************************/
16 class MergeSfffilesCommand : public Command {
17         
18 public:
19         MergeSfffilesCommand(string);
20         MergeSfffilesCommand();
21         ~MergeSfffilesCommand(){}
22         
23         vector<string> setParameters();
24         string getCommandName()                 { return "merge.sfffiles";                                      }
25         string getCommandCategory()             { return "Sequence Processing";         }
26         
27         string getHelpString();
28     string getOutputPattern(string);
29         string getCitation() { return "http://www.mothur.org/wiki/merge.sfffiles"; }
30         string getDescription()         { return "merge individual sfffiles into a single .sff file"; }
31     
32         int execute();
33         void help() { m->mothurOut(getHelpString()); }
34         
35 private:
36         string sffFilename, outputDir, file, currentFileName;
37         vector<string> filenames, outputNames;
38         bool abort;
39     int numTotalReads, allFilesnumFlowReads, allFileskeyLength;
40     string outputFile, outputFileHeader;
41     vector<CommonHeader> commonHeaders;
42     
43         //extract sff file functions
44         int mergeSffInfo(string, ofstream&);
45         int readCommonHeader(ifstream&, CommonHeader&);
46         int readHeader(ifstream&, Header&);
47         bool readSeqData(ifstream&, seqRead&, int, Header&, ofstream&);
48         int decodeName(string&, string&, string&, string);
49  
50         bool sanityCheck(Header&, seqRead&);
51     int adjustCommonHeader();
52     int readFile();
53 };
54
55 /**********************************************************/
56
57 #endif