00001 /* Last edited: Sep 6 13:48 2001 (ac2) */ 00002 00003 // ####################################################################### 00004 00005 // SSAHA : Sequence Search and Alignment by Hashing Algorithm 00006 // Version 3.2, released 1st March 2004 00007 // Copyright (c) Genome Research 2002 00008 00009 // SSAHA is free software; you can redistribute it and/or modify 00010 // it under the terms of version 2 of the GNU General Public Licence 00011 // as published by the Free Software Foundation. 00012 00013 // This program is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public Licence for more details. 00017 00018 // You should have received a copy of the GNU General Public Licence 00019 // along with this program; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 // or see the on-line version at http://www.gnu.org/copyleft/gpl.txt 00022 00023 // ####################################################################### 00024 00025 // Module Name : SequenceReaderFastq 00026 // File Name : SequenceReaderFastq.h 00027 // Language : C++ 00028 // Module Author: Anthony J. Cox (ac2@sanger.ac.uk) 00029 00030 // Include guard: 00031 #ifndef INCLUDED_SequenceReaderFastq 00032 #define INCLUDED_SequenceReaderFastq 00033 00034 // Description: 00035 00036 // Includes: 00037 00038 class WordSequence; 00039 #include "SequenceReaderFasta.h" 00040 #include <string> 00041 00042 // NB it is good practise for #include statements in header files to be 00043 // replaced by forward declarations if at all possible 00044 00045 // ### Class Declarations ### 00046 00047 00048 // Class Name : 00049 // Description: 00050 class SequenceReaderFastq : public SequenceReaderFile 00051 { 00052 00053 // PUBLIC MEMBER FUNCTIONS 00054 public: 00055 00056 // Constructors and Destructors 00057 00058 // Function Name: 00059 // Arguments: 00060 // TYPE NAME IN/OUT COMMENT 00061 // Returns: TYPE COMMENT 00062 // SequenceReaderFastq( const char* fileName, ostream& monitoringStream = cerr); 00063 SequenceReaderFastq 00064 ( const char* fileName, 00065 SequenceEncoder* pEncoder, 00066 ostream& monitoringStream = cerr ); 00067 SequenceReaderFastq 00068 ( const char* fileName, 00069 ostream& monitoringStream = cerr ); 00070 00071 // Function Name: 00072 // Arguments: 00073 // TYPE NAME IN/OUT COMMENT 00074 // Returns: TYPE COMMENT 00075 SequenceReaderFastq( const SequenceReaderFastq& rhs); 00076 00077 // Function Name: 00078 // Arguments: 00079 // TYPE NAME IN/OUT COMMENT 00080 // Returns: TYPE COMMENT 00081 ~SequenceReaderFastq(); 00082 // (NB destructor should be virtual if class is to be derived from) 00083 00084 // Manipulator Functions 00085 virtual SequenceReader* clone( void ) 00086 { 00087 return new SequenceReaderFastq( *this ); 00088 } 00089 00090 00091 // Function Name: 00092 // Arguments: 00093 // TYPE NAME IN/OUT COMMENT 00094 // Returns: TYPE COMMENT 00095 00096 // Accessor Functions 00097 // (NB all accessor functions should be 'const') 00098 00099 // Function Name: getNextSequence 00100 // Arguments: WordSequence& (out), int (in) 00101 // Returns: int 00102 // Read the next set of sequence information from the file and parse it 00103 // into WordSequence format. Returns -1 if a problem, else the number of 00104 // valid base pairs in the final word of the sequence 00105 virtual int getNextSequence( WordSequence& nextSeq, int wordLength ); 00106 00107 // PROTECTED MEMBER FUNCTIONS 00108 // (visible to this class and derived classes only) 00109 protected: 00110 00111 // PRIVATE MEMBER FUNCTIONS 00112 // (visible to instances of this class only) 00113 00114 private: 00115 SequenceReaderFastq& operator=(const SequenceReaderFastq&);// NOT IMPLEMENTED 00116 00117 // PROTECTED DATA: 00118 // (visible to this class and derived classes only) 00119 protected: 00120 00121 // PRIVATE MEMBER DATA 00122 private: 00123 00124 }; // SequenceReaderFastq 00125 00126 typedef SequenceReaderFastq SequenceReaderFastqDNA; 00127 00128 class SequenceReaderFastqProtein : public SequenceReaderFastq 00129 { 00130 00131 // PUBLIC MEMBER FUNCTIONS 00132 public: 00133 00134 // Constructors and Destructors 00135 00136 // Function Name: 00137 // Arguments: 00138 // TYPE NAME IN/OUT COMMENT 00139 // Returns: TYPE COMMENT 00140 SequenceReaderFastqProtein( const char* fileName, 00141 ostream& monitoringStream = cerr ); 00142 00143 }; // SequenceReaderFastqProtein 00144 00145 00146 00147 // ### Function Declarations ### 00148 00149 // Name: 00150 // Arguments: 00151 // TYPE NAME IN/OUT COMMENT 00152 // Returns: TYPE COMMENT 00153 00154 // End of include guard: 00155 #endif 00156 00157 // End of file SequenceReaderFastq.h
1.5.2