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);
93 bool printQualAvg =
false);
105 String mySequenceIdentifier;
118 bool validateFastQSequence();
121 bool validateSequenceIdentifierLine();
128 bool validateRawSequenceAndPlusLines();
131 bool validateQualityStringLines();
135 bool validateRawSequence(
int offset);
139 bool validateSequencePlus();
143 bool validateQualityString(
int offset);
152 void reportErrorOnLine();
158 void resetForEachSequence();
161 void logMessage(
const char* message);
181 String myTempPartialQuality;
189 unsigned int myLineNum;
191 std::vector<int> myQualPerCycle;
192 std::vector<int> myCountPerCycle;
199 std::map<std::string, unsigned int> myIdentifierMap;
205 int myNumPrintableErrors;
215 bool myDisableMessages;
FastQStatus::Status openFile(const char *fileName, BaseAsciiMap::SPACE_TYPE spaceType=BaseAsciiMap::UNKNOWN)
Open a FastQFile.
bool isOpen()
Check to see if the file is open.
FastQFile(int minReadLength=10, int numPrintableErrors=20)
Constructor.
void disableSeqIDCheck()
Disable Unique Sequence ID checking (Unique Sequence ID checking is enabled by default).
@ UNKNOWN
Base decision on the first raw seq character/type has yet to be determined.
void enableMessages()
Enable messages - write to cout.
void disableMessages()
Disable messages - do not write to cout.
BaseAsciiMap::SPACE_TYPE getSpaceType()
Get the space type for this composition.
SPACE_TYPE
The type of space (color or base) to use in the mapping.
FastQStatus::Status closeFile()
Close a FastQFile.
Class that tracks the composition of base by read location.
bool keepReadingFile()
Returns whether or not to keep reading the file, it stops reading (false) if eof or there is a proble...
Class for reading/validating a fastq file.
void setMaxErrors(int maxErrors)
Set the number of errors after which to quit reading/validating a file, defaults to -1.
BaseAsciiMap::SPACE_TYPE getSpaceType()
Get the space type used for this file.
FastQStatus::Status readFastQSequence()
Read 1 FastQSequence, validating it.
FastQStatus::Status validateFastQFile(const String &filename, bool printBaseComp, BaseAsciiMap::SPACE_TYPE spaceType, bool printQualAvg=false)
Validate the specified fastq file.
void enableSeqIDCheck()
Enable Unique Sequence ID checking.
Status
Return value enum for the FastQFile class methods, indicating success or error codes.
bool isEof()
Check to see if the file is at the end of the file.