18#ifndef __FASTQ_VALIDATOR_H__
19#define __FASTQ_VALIDATOR_H__
23#include "StringBasics.h"
25#include "BaseComposition.h"
26#include "FastQStatus.h"
37 FastQFile(
int minReadLength = 10,
int numPrintableErrors = 20);
96 bool printQualAvg =
false);
108 String mySequenceIdentifier;
121 bool validateFastQSequence();
124 bool validateSequenceIdentifierLine();
131 bool validateRawSequenceAndPlusLines();
134 bool validateQualityStringLines();
138 bool validateRawSequence(
int offset);
142 bool validateSequencePlus();
146 bool validateQualityString(
int offset);
155 void reportErrorOnLine();
161 void resetForEachSequence();
164 void logMessage(
const char* message);
184 String myTempPartialQuality;
192 unsigned int myLineNum;
194 std::vector<int> myQualPerCycle;
195 std::vector<int> myCountPerCycle;
206 std::string myPrevSeqID;
209 std::map<std::string, unsigned int> myIdentifierMap;
215 int myNumPrintableErrors;
225 bool myDisableMessages;
SPACE_TYPE
The type of space (color or base) to use in the mapping.
@ UNKNOWN
Base decision on the first raw seq character/type has yet to be determined.
Class that tracks the composition of base by read location.
BaseAsciiMap::SPACE_TYPE getSpaceType()
Get the space type for this composition.
Class for reading/validating a fastq file.
void interleaved()
Interleaved.
FastQStatus::Status openFile(const char *fileName, BaseAsciiMap::SPACE_TYPE spaceType=BaseAsciiMap::UNKNOWN)
Open a FastQFile.
void enableSeqIDCheck()
Enable Unique Sequence ID checking.
void disableMessages()
Disable messages - do not write to cout.
bool isOpen()
Check to see if the file is open.
void disableSeqIDCheck()
Disable Unique Sequence ID checking (Unique Sequence ID checking is enabled by default).
BaseAsciiMap::SPACE_TYPE getSpaceType()
Get the space type used for this file.
FastQStatus::Status readFastQSequence()
Read 1 FastQSequence, validating it.
FastQStatus::Status closeFile()
Close a FastQFile.
FastQStatus::Status validateFastQFile(const String &filename, bool printBaseComp, BaseAsciiMap::SPACE_TYPE spaceType, bool printQualAvg=false)
Validate the specified fastq file.
bool keepReadingFile()
Returns whether or not to keep reading the file, it stops reading (false) if eof or there is a proble...
void enableMessages()
Enable messages - write to cout.
void setMaxErrors(int maxErrors)
Set the number of errors after which to quit reading/validating a file, defaults to -1.
bool isEof()
Check to see if the file is at the end of the file.
Status
Return value enum for the FastQFile class methods, indicating success or error codes.