]> git.donarmstrong.com Git - mothur.git/blobdiff - sffinfocommand.h
some alterations to chimera.slayer
[mothur.git] / sffinfocommand.h
index 219e125943a812ac9bfdd026fe0608cdb2a8f5fe..0e242afa2f3eab6e53b1d8927c1658aecee97fc6 100644 (file)
@@ -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,24 +63,45 @@ class SffInfoCommand : public Command {
        
 public:
        SffInfoCommand(string);
-       ~SffInfoCommand();
-       int execute();
-       void help();
+       SffInfoCommand();
+       ~SffInfoCommand(){}
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "sffinfo";                                     }
+       string getCommandCategory()             { return "Sequence Processing";         }
+       string getHelpString(); 
+       
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
        
 private:
-       string sffFilename, outputDir;
-       vector<string> filenames, outputNames;
-       bool abort;
+       string sffFilename, sfftxtFilename, outputDir, accnosName;
+       vector<string> filenames, outputNames, accnosFileNames;
+       bool abort, fasta, qual, trim, flow, sfftxt, hasAccnos;
+       int mycount;
+       set<string> seqNames;
        
+       //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 printSeqData(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<unsigned short> parseHeaderLineToFloatVector(ifstream&, int);
+       vector<unsigned int> parseHeaderLineToIntVector(ifstream&, int);
+       string parseHeaderLineToString(ifstream&);
 };
 
 /**********************************************************/