1 #ifndef SFFINFOCOMMAND_H
2 #define SFFINFOCOMMAND_H
8 * Created by westcott on 7/7/10.
9 * Copyright 2010 Schloss Lab. All rights reserved.
13 #include "command.hpp"
16 /**********************************************************/
18 unsigned int magicNumber;
20 unsigned long int indexOffset;
21 unsigned int indexLength;
22 unsigned int numReads;
23 unsigned short headerLength;
24 unsigned short keyLength;
25 unsigned short numFlowsPerRead;
26 int flogramFormatCode;
27 string flowChars; //length depends on number flow reads
28 string keySequence; //length depends on key length
30 CommonHeader(){ magicNumber=0; indexOffset=0; indexLength=0; numReads=0; headerLength=0; keyLength=0; numFlowsPerRead=0; flogramFormatCode='s'; }
33 /**********************************************************/
35 unsigned short headerLength;
36 unsigned short nameLength;
37 unsigned int numBases;
38 unsigned short clipQualLeft;
39 unsigned short clipQualRight;
40 unsigned short clipAdapterLeft;
41 unsigned short clipAdapterRight;
42 string name; //length depends on nameLength
44 Header() { headerLength=0; nameLength=0; numBases=0; clipQualLeft=0; clipQualRight=0; clipAdapterLeft=0; clipAdapterRight=0; }
47 /**********************************************************/
49 vector<unsigned short> flowgram;
50 vector<unsigned int> flowIndex;
52 vector<unsigned int> qualScores;
57 /**********************************************************/
59 class SffInfoCommand : public Command {
62 SffInfoCommand(string);
68 string sffFilename, outputDir, accnosName;
69 vector<string> filenames, outputNames, accnosFileNames;
70 bool abort, fasta, qual, trim, flow, sfftxt, hasAccnos;
73 int extractSffInfo(string, string);
74 int readCommonHeader(ifstream&, CommonHeader&);
75 int readHeader(ifstream&, Header&);
76 int readSeqData(ifstream&, seqRead&, int, int);
78 int printCommonHeader(ofstream&, CommonHeader&);
79 int printHeader(ofstream&, Header&);
80 int printSffTxtSeqData(ofstream&, seqRead&, Header&);
81 int printFlowSeqData(ofstream&, seqRead&, Header&);
82 int printFastaSeqData(ofstream&, seqRead&, Header&);
83 int printQualSeqData(ofstream&, seqRead&, Header&);
84 int readAccnosFile(string);
88 /**********************************************************/