X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sffinfocommand.h;h=0fdf6fce6647269d476945031255bb585e78ba83;hb=01b7dae5525a480d31a1de5bc273692726da8570;hp=b533f2864eb44e9091f1eacaaeab35fabbf00e01;hpb=dfae916a398508554d35c6b3c8002b69becb53be;p=mothur.git diff --git a/sffinfocommand.h b/sffinfocommand.h index b533f28..0fdf6fc 100644 --- a/sffinfocommand.h +++ b/sffinfocommand.h @@ -40,6 +40,9 @@ struct Header { unsigned short clipAdapterLeft; unsigned short clipAdapterRight; string name; //length depends on nameLength + string timestamp; + string region; + string xy; Header() { headerLength=0; nameLength=0; numBases=0; clipQualLeft=0; clipQualRight=0; clipAdapterLeft=0; clipAdapterRight=0; } ~Header() { } @@ -60,29 +63,44 @@ class SffInfoCommand : public Command { public: SffInfoCommand(string); + SffInfoCommand(); ~SffInfoCommand(); + vector getRequiredParameters(); + vector getValidParameters(); + vector getRequiredFiles(); + map > getOutputFiles() { return outputTypes; } int execute(); void help(); private: - string sffFilename, outputDir, accnosName; + string sffFilename, sfftxtFilename, outputDir, accnosName; vector filenames, outputNames, accnosFileNames; bool abort, fasta, qual, trim, flow, sfftxt, hasAccnos; + int mycount; set seqNames; + map > outputTypes; + //extract sff file functions int extractSffInfo(string, string); int readCommonHeader(ifstream&, CommonHeader&); int readHeader(ifstream&, Header&); int readSeqData(ifstream&, seqRead&, int, int); + int decodeName(string&, string&, string&, string); int printCommonHeader(ofstream&, CommonHeader&); int printHeader(ofstream&, Header&); - int printSffTxtSeqData(ofstream&, seqRead&); + int printSffTxtSeqData(ofstream&, seqRead&, Header&); int printFlowSeqData(ofstream&, seqRead&, Header&); int printFastaSeqData(ofstream&, seqRead&, Header&); int printQualSeqData(ofstream&, seqRead&, Header&); int readAccnosFile(string); - + int parseSffTxt(); + + //parsesfftxt file functions + int parseHeaderLineToInt(ifstream&); + vector parseHeaderLineToFloatVector(ifstream&, int); + vector parseHeaderLineToIntVector(ifstream&, int); + string parseHeaderLineToString(ifstream&); }; /**********************************************************/