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;
void disableMessages()
Disable messages - do not write to cout.
bool isOpen()
Check to see if the file is open.
FastQFile(int minReadLength=10, int numPrintableErrors=20)
Constructor.
bool keepReadingFile()
Returns whether or not to keep reading the file, it stops reading (false) if eof or there is a proble...
BaseAsciiMap::SPACE_TYPE getSpaceType()
Get the space type for this composition.
bool isEof()
Check to see if the file is at the end of the file.
FastQStatus::Status readFastQSequence()
Read 1 FastQSequence, validating it.
void disableSeqIDCheck()
Disable Unique Sequence ID checking (Unique Sequence ID checking is enabled by default).
Base decision on the first raw seq character/type has yet to be determined.
FastQStatus::Status openFile(const char *fileName, BaseAsciiMap::SPACE_TYPE spaceType=BaseAsciiMap::UNKNOWN)
Open a FastQFile.
Class that tracks the composition of base by read location.
FastQStatus::Status validateFastQFile(const String &filename, bool printBaseComp, BaseAsciiMap::SPACE_TYPE spaceType, bool printQualAvg=false)
Validate the specified fastq file.
Class for reading/validating a fastq file.
SPACE_TYPE
The type of space (color or base) to use in the mapping.
Status
Return value enum for the FastQFile class methods, indicating success or error codes.
FastQStatus::Status closeFile()
Close a FastQFile.
void setMaxErrors(int maxErrors)
Set the number of errors after which to quit reading/validating a file, defaults to -1...
void enableSeqIDCheck()
Enable Unique Sequence ID checking.
BaseAsciiMap::SPACE_TYPE getSpaceType()
Get the space type used for this file.
void enableMessages()
Enable messages - write to cout.