Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Contig_AMOS.hh

Go to the documentation of this file.
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 #ifndef __Contig_AMOS_HH 00011 #define __Contig_AMOS_HH 1 00012 00013 #include "Sequence_AMOS.hh" 00014 #include "Layout_AMOS.hh" 00015 #include <vector> 00016 00017 00018 00019 00020 namespace AMOS { 00021 00022 //================================================ Contig_t ==================== 00034 //============================================================================== 00035 class Contig_t : public Sequence_t 00036 { 00037 00038 private: 00039 00040 std::vector<Pos_t> gaps_m; 00041 std::vector<Tile_t> reads_m; 00042 00043 00044 //--------------------------------------------------- compress --------------- 00047 void compress ( ); 00048 00049 00050 //--------------------------------------------------- uncompress ------------- 00053 void uncompress ( ); 00054 00055 00056 protected: 00057 00058 //--------------------------------------------------- readRecord ------------- 00059 virtual void readRecord (std::istream & fix, std::istream & var); 00060 00061 00062 //--------------------------------------------------- writeRecord ------------ 00063 virtual void writeRecord (std::ostream & fix, std::ostream & var) const; 00064 00065 00066 public: 00067 00068 static const NCode_t NCODE; 00070 00071 00072 //--------------------------------------------------- Contig_t --------------- 00075 Contig_t ( ) 00076 { 00077 00078 } 00079 00080 00081 //--------------------------------------------------- Contig_t --------------- 00084 Contig_t (const Contig_t & source) 00085 { 00086 *this = source; 00087 } 00088 00089 00090 //--------------------------------------------------- ~Contig_t -------------- 00093 ~Contig_t ( ) 00094 { 00095 00096 } 00097 00098 00099 //--------------------------------------------------- clear ------------------ 00100 virtual void clear ( ) 00101 { 00102 Sequence_t::clear( ); 00103 gaps_m . clear( ); 00104 reads_m . clear( ); 00105 } 00106 00107 00108 //--------------------------------------------------- gap2ungap -------------- 00119 Pos_t gap2ungap (Pos_t gap) const; 00120 00121 00122 //--------------------------------------------------- ungap2gap -------------- 00131 Pos_t ungap2gap (Pos_t ungap) const; 00132 00133 00134 //--------------------------------------------------- getNCode --------------- 00135 virtual NCode_t getNCode ( ) const 00136 { 00137 return Contig_t::NCODE; 00138 } 00139 00140 00141 //--------------------------------------------------- getReadTiling ---------- 00146 const std::vector<Tile_t> & getReadTiling ( ) const 00147 { 00148 return reads_m; 00149 } 00150 00151 00152 //--------------------------------------------------- getReadTiling ---------- 00153 std::vector<Tile_t> & getReadTiling ( ) 00154 { 00155 return reads_m; 00156 } 00157 00158 00159 //--------------------------------------------------- getSpan ---------------- 00167 Size_t getSpan ( ) const; 00168 00169 00170 //--------------------------------------------------- getUngappedLength ------ 00178 Size_t getUngappedLength ( ) const; 00179 00180 00181 //--------------------------------------------------- getUngappedQualString -- 00188 std::string getUngappedQualString ( ) const 00189 { 00190 return getUngappedQualString (Range_t (0, getLength( ))); 00191 } 00192 00193 00194 //--------------------------------------------------- getUngappedQualString -- 00207 std::string getUngappedQualString (Range_t range) const; 00208 00209 00210 //--------------------------------------------------- getUngappedSeqString --- 00215 std::string getUngappedSeqString ( ) const 00216 { 00217 return getUngappedSeqString (Range_t (0, getLength( ))); 00218 } 00219 00220 00221 //--------------------------------------------------- getUngappedSeqString --- 00234 std::string getUngappedSeqString (Range_t range) const; 00235 00236 00237 //--------------------------------------------------- readMessage ------------ 00238 virtual void readMessage (const Message_t & msg); 00239 00240 00241 //--------------------------------------------------- readUMD ---------------- 00256 bool readUMD (std::istream & in); 00257 00258 00259 //--------------------------------------------------- setReadTiling ---------- 00265 void setReadTiling (const std::vector<Tile_t> & reads) 00266 { 00267 reads_m = reads; 00268 } 00269 00270 00271 //--------------------------------------------------- setReadTiling ---------- 00277 void setReadTiling (const Layout_t & layout) 00278 { 00279 reads_m = layout . getTiling( ); 00280 } 00281 00282 00283 //--------------------------------------------------- writeMessage ----------- 00284 virtual void writeMessage (Message_t & msg) const; 00285 00286 00287 //--------------------------------------------------- writeUMD --------------- 00299 void writeUMD (std::ostream & out) const; 00300 00301 }; 00302 00303 } // namespace AMOS 00304 00305 #endif // #ifndef __Contig_AMOS_HH

Generated on Tue May 17 15:19:01 2005 for libAMOS by doxygen 1.3.8