18 #ifndef __SAM_VALIDATION_H__ 19 #define __SAM_VALIDATION_H__ 92 static const char* enumTypeString[];
93 static const char* enumSeverityString[];
97 std::string myMessage;
103 inline std::ostream &
operator << (std::ostream &stream,
106 std::string errorMessage;
108 stream << errorMessage;
130 const char* newMessage);
133 unsigned int numErrors();
141 void resetErrorIter();
148 std::list<const SamValidationError*> myValidationErrors;
149 std::list<const SamValidationError*>::const_iterator myErrorIter;
154 inline std::ostream&
operator << (std::ostream& stream,
157 std::string errorString =
"";
159 stream << errorString;
199 static bool isValidQname(
const char* qname, uint8_t qnameLen,
208 static bool isValidFlag(uint16_t flag,
230 static bool isValidRname(
const char* rname,
253 static bool isValid1BasedPos(int32_t pos,
262 static bool isValidMapQuality(uint8_t mapQuality,
273 static bool isValidSequence(
SamRecord& samRecord,
287 static bool isValidCigar(
SamRecord& samRecord,
302 static bool isValidCigar(
const char* cigar,
const char* sequence,
317 static bool isValidCigar(
const char* cigar,
324 static bool isValidMrnm();
329 static bool isValidMpos();
334 static bool isValidIsize();
339 static bool isValidSeq();
350 static bool isValidQuality(
SamRecord& samRecord,
363 static bool isValidQuality(
const char* quality,
const char* sequence,
376 bool static isValidQuality(
const char* quality,
388 static bool isValidTags(
SamRecord& samRecord,
394 static bool isValidVtype();
399 static bool isValidValue();
The SamValidationError class describes a validation error that occured, containing the error type...
void getErrorString(std::string &errorString) const
Append the error messages contained in this container to the passed in string.
Severity getSeverity() const
Return the severity enum of this validation error object.
const char * getMessage() const
Return the error message of this validation error object.
const char * getTypeString() const
Return the string representing this object's type of validation error.
Invalid mate/next fragment reference name.
void getErrorString(std::string &errorString) const
Get the error string representing this object's error.
const char * getSeverityString() const
Return the string representing this object's severity of validation error.
Error is used if parsing could not succeed.
Class for tracking the reference information mapping between the reference ids and the reference name...
Type getType() const
Return the type enum of this validation error object.
The SamValidator class contains static methods for validating the SAM/BAM Record and each of its fiel...
Severity
Severity of the error.
Warning is used if it is just an invalid value.
The SamValidationErrors class is a container class that holds SamValidationError Objects, allowing a validation method to return all of the invalid errors rather than just one.
Class providing an easy to use interface to get/set/operate on the fields in a SAM/BAM record...
void printError() const
Print a formatted output of the error to cerr.