Changes

From Genome Analysis Wiki
Jump to navigationJump to search
4,579 bytes removed ,  14:00, 7 September 2011
Update for doxygen
Line 6: Line 6:  
The '''FastQFile''' class allows a user to easily read/validate a fastq file.
 
The '''FastQFile''' class allows a user to easily read/validate a fastq file.
   −
=== Public Class Methods ===
+
Documentation on this class is available at: http://www.sph.umich.edu/csg/mktrost/doxygen/current/classFastQFile.html
 
  −
{| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1"
  −
|-style="background: #f2f2f2; text-align: center;"  '''SamFile Class Methods'''
  −
! Method Name !!  Description
  −
|-
  −
| <code>FastQFile::FastQFile(int minReadLength = 10, int maxReportedErrors = 20)</code>
  −
| Initializes the FastQFile class setting the minimum length that a base sequence must be for it to be valid to minReadLength and setting the maximum number of errors that should be reported in detail before suppressing the errors to maxReportedErrors.
  −
|-
  −
| <code> void FastQFile::disableMessages()</code>
  −
| Disables cout messages.  This does not include the Base Composition.  Those are turned on/off based with a parameter to validateFastQFile.
  −
|-
  −
| <code>void FastQFile::enableMessages()</code>
  −
|Enables cout messages.  This does not include the Base Composition.  Those are turned on/off based on a parameter to validateFastQFile.
  −
|-
  −
| <code>void FastQFile::setQuitAfterErrorNum(int quitAfterErrorNum)</code>
  −
| Set the number of errors after which to quit reading/validating a file. (Defaults to -1)
  −
-1 indicates to not quit until the entire file has been read/validated.
  −
 
  −
0 indicates to quit without reading/validating anything.
  −
|-
  −
| <code>FastQStatus FastQFile::openFile(const char* fileName, BaseAsciiMap::SPACE_TYPE spaceType = BaseAsciiMap::UNKNOWN)</code>
  −
| Open the specified fastq file with the specified base space type which defaults to UNKOWN (base the decision on the first character of the sequence).
  −
 
  −
Returns FastQStatus to indicate if the open was successful or not.
  −
|-
  −
| <code>FastQStatus FastQFile::closeFile()</code>
  −
| Close the opened fastq file.
  −
Returns FastQStatus to indicate if the close was successful or not.
  −
|-
  −
| <code>bool FastQFile::isOpen()</code>
  −
| Returns true if a fastq file is open, false if one is not open.
  −
|-
  −
| <code>bool FastQFile::isEof()</code>
  −
| Returns true if it is the end of the file, false if not.
  −
|-
  −
| <code>bool FastQFile::keepReadingFile()</code>
  −
| Returns true if the file should continue to be read.  Returns false on EOF or on a read error (corrupt gzip files never indicate EOF).
  −
This method should be used for loops that continually read sequences instead of FastQFile::isEof()
  −
|-
  −
| <code>FastQStatus FastQFile::validateFastQFile(const String &filename, bool printBaseComp, BaseAsciiMap::SPACE_TYPE spaceType)</code>
  −
| Validates the specified fastq file using the specified [[C++ Class: BaseAsciiMap#Public Class Enums|SpaceType]], printing the base composition if specified by printBaseComp.
  −
Returns the fastq validation status -  SUCCESS on a successfully validated fastq file.
  −
 
  −
Invalid error messages are printed to cout until maxReportedErrors is hit.
  −
|-
  −
| <code>FastQStatus FastQFile::readFastQSequence()</code>
  −
| Read the next fastq sequence from the file
  −
Returns FASTQ_SUCCESS if it was successfully read and was valid.  Otherwise the failure status is returned.
  −
 
  −
Invalid error messages are printed to cout until maxReportedErrors is hit.
  −
|-
  −
| <code>BaseAsciiMap::SPACE_TYPE FastQFile::getSpaceType()</code>
  −
| Return the [[C++ Class: BaseAsciiMap#Public Class Enums|SpaceType]] for the File
  −
|-
  −
|}
  −
 
  −
=== Public Class Attributes ===
  −
These attributes allow access to the contents of the last read fastq sequence.  They are public <code>String</code> variables in order to avoid copying the strings.
  −
 
  −
{| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1"
  −
|-style="background: #f2f2f2; text-align: center;"
  −
! Attribute !!  Description
  −
|-
  −
| <code>myRawSequence</code>
  −
| <code>String</code> containing the raw sequence for the last fastq sequence that was read.
  −
|-
  −
| <code>mySequenceIdLine</code>
  −
| <code>String</code> containing the sequence identifier line for the last fastq sequence that was read.
  −
|-
  −
| <code>mySequenceIdentifier</code>
  −
| <code>String</code> containing the sequence identifier for the last fastq sequence that was read.
  −
|-
  −
| <code>myPlusLine</code>
  −
| <code>String</code> containing the plus line for the last fastq sequence that was read.
  −
|-
  −
| <code>myQualityString</code>
  −
| <code>String</code> containing the quality string for the last fastq sequence that was read.
  −
|}
  −
 
  −
=== Public Class Enums ===
  −
{| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1"
  −
|-style="background: #f2f2f2; text-align: center;"
  −
! colspan="2"| enum FastQStatus
  −
|-
  −
! Enum Value !!  Description
  −
|-
  −
| FASTQ_SUCCESS
  −
| method finished successfully.
  −
|-
  −
| FASTQ_FAILURE
  −
| method failed to complete successfully.
  −
|-
  −
| FASTQ_INVALID
  −
| sequence was invalid.
  −
|}
      
=== Usage Example ===
 
=== Usage Example ===

Navigation menu