2 // mergesfffilecommand.h
5 // Created by Sarah Westcott on 1/31/14.
6 // Copyright (c) 2014 Schloss Lab. All rights reserved.
9 #ifndef Mothur_mergesfffilecommand_h
10 #define Mothur_mergesfffilecommand_h
12 #include "command.hpp"
15 /**********************************************************/
16 class MergeSfffilesCommand : public Command {
19 MergeSfffilesCommand(string);
20 MergeSfffilesCommand();
21 ~MergeSfffilesCommand(){}
23 vector<string> setParameters();
24 string getCommandName() { return "merge.sfffiles"; }
25 string getCommandCategory() { return "Sequence Processing"; }
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"; }
33 void help() { m->mothurOut(getHelpString()); }
36 string sffFilename, outputDir, file, currentFileName;
37 vector<string> filenames, outputNames;
39 int numTotalReads, allFilesnumFlowReads, allFileskeyLength;
40 string outputFile, outputFileHeader;
41 vector<CommonHeader> commonHeaders;
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);
50 bool sanityCheck(Header&, seqRead&);
51 int adjustCommonHeader();
55 /**********************************************************/