X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=sffinfocommand.h;h=b304e485c1270aba1b4b761dc9e7b66af54dcfcf;hb=fefd5ee1517abd3bc38b469cb2dffc85a1571c7e;hp=1909e2d43e6d83b3d48ef06922b2d369a0e104d5;hpb=3e8b80da722e11c72bce957e2f42a6e884dd02b6;p=mothur.git diff --git a/sffinfocommand.h b/sffinfocommand.h index 1909e2d..b304e48 100644 --- a/sffinfocommand.h +++ b/sffinfocommand.h @@ -12,51 +12,9 @@ #include "command.hpp" #include "groupmap.h" +#include "oligos.h" +#include "trimoligos.h" -/**********************************************************/ -struct CommonHeader { - unsigned int magicNumber; - string version; - unsigned long long indexOffset; - unsigned int indexLength; - unsigned int numReads; - unsigned short headerLength; - unsigned short keyLength; - unsigned short numFlowsPerRead; - int flogramFormatCode; - string flowChars; //length depends on number flow reads - string keySequence; //length depends on key length - - CommonHeader(){ magicNumber=0; indexOffset=0; indexLength=0; numReads=0; headerLength=0; keyLength=0; numFlowsPerRead=0; flogramFormatCode='s'; } - ~CommonHeader() { } -}; -/**********************************************************/ -struct Header { - unsigned short headerLength; - unsigned short nameLength; - unsigned int numBases; - unsigned short clipQualLeft; - unsigned short clipQualRight; - 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() { } -}; -/**********************************************************/ -struct seqRead { - vector flowgram; - vector flowIndex; - string bases; - vector qualScores; - - seqRead() { } - ~seqRead() { } -}; /**********************************************************/ class SffInfoCommand : public Command { @@ -81,22 +39,20 @@ public: private: string sffFilename, sfftxtFilename, outputDir, accnosName, currentFileName, oligosfile, noMatchFile, groupfile; vector filenames, outputNames, accnosFileNames, oligosFileNames, groupFileNames; - bool abort, fasta, qual, trim, flow, sfftxt, hasAccnos, hasOligos, hasGroup; - int mycount, split, numFPrimers, numLinkers, numSpacers, pdiffs, bdiffs, ldiffs, sdiffs, tdiffs, numNoMatch; + bool abort, fasta, qual, trim, flow, sfftxt, hasAccnos, hasOligos, hasGroup, reorient, pairedOligos; + int mycount, split, numBarcodes, numFPrimers, numLinkers, numSpacers, numRPrimers, pdiffs, bdiffs, ldiffs, sdiffs, tdiffs, numNoMatch; set seqNames; - map barcodes; - map primers; GroupMap* groupMap; - vector linker, spacer, primerNameVector, barcodeNameVector, revPrimer; vector > numSplitReads; vector > filehandles; vector > filehandlesHeaders; + Oligos* oligosObject; //extract sff file functions int extractSffInfo(string, string, string); int readCommonHeader(ifstream&, CommonHeader&); int readHeader(ifstream&, Header&); - bool readSeqData(ifstream&, seqRead&, int, Header&); + bool readSeqData(ifstream&, seqRead&, int, Header&, TrimOligos*&, TrimOligos*&); int decodeName(string&, string&, string&, string); bool readOligos(string oligosFile); bool readGroup(string oligosFile); @@ -111,7 +67,7 @@ private: int parseSffTxt(); bool sanityCheck(Header&, seqRead&); int adjustCommonHeader(CommonHeader); - int findGroup(Header header, seqRead read, int& barcode, int& primer); + int findGroup(Header header, seqRead read, int& barcode, int& primer, TrimOligos*&, TrimOligos*&); int findGroup(Header header, seqRead read, int& barcode, int& primer, string); string reverseOligo(string oligo);