Changeset 3222
- Timestamp:
- May 7, 2014, 5:37:33 AM (9 years ago)
- Location:
- branches/0.12-stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.12-stable/test/bam.cc
r3221 r3222 56 56 suite.out() << "size: " << size << " " << bam.aux_size() << "\n"; 57 57 suite.add(bam.aux_size() == size+4); 58 bam.aux(); 58 59 bam.aux("ZZ"); 59 60 char c1 = bam_aux2A(bam.aux("ZZ")); … … 70 71 BamRead bam(b); 71 72 73 bam.cigar(); 74 bam.cigar(0); 75 bam.cigar_op(0); 76 bam.cigar_oplen(0); 77 72 78 suite.out() << "test cigar:\n"; 73 79 suite.out() << bam.cigar_str() << "\n"; … … 227 233 BamRead bam; 228 234 in.read(bam); 235 // test that functions are implemented 236 bam.end(); 237 bam.flag(); 238 bam.mpos(); 239 bam.mtid(); 240 bam.pos(); 241 bam.tid(); 242 bam.swap(bam); 229 243 std::string str = "AGCTTTGTTATTATTTGAGGGTGTGGTTCAGTTGTAAACAGTGTATG" 230 244 "TTTTAGAATTTGTGTTATTGTGATGGCGATGACCAAGTACAACATATTTCCCA"; -
branches/0.12-stable/yat/omic/BamRead.cc
r3221 r3222 187 187 { return bam_->core; } 188 188 189 190 uint16_t BamRead::flag(void) const 191 { 192 return bam_->core.flag; 193 } 189 194 190 195 const char* BamRead::name(void) const -
branches/0.12-stable/yat/omic/BamRead.h
r3221 r3222 189 189 190 190 /** 191 \brief rightmost coordinate 192 193 Coordinate is 0-based, i.e., the end is one passed the last 194 matching position. 195 196 \see bam_calend 197 */ 198 int32_t end(void) const; 199 200 /** 201 \brief bitwise flag 202 203 \see Preprocessor defines BAM_F* 204 205 \since implemented since yat 0.12 206 */ 207 uint16_t flag(void) const; 208 209 /** 210 \brief leftmost position for mate 211 */ 212 int32_t mpos(void) const; 213 214 /** 215 \brief Chromosome ID for mate 216 */ 217 int32_t mtid(void) const; 218 219 /** 220 \return query name 221 222 Length of array is described by core().l_qname 223 */ 224 const char* name(void) const; 225 226 /** 227 \brief modify name 228 229 \since New in yat 0.11 230 */ 231 void name(const std::string& n); 232 233 /** 234 \brief 0-based laftmost coordinate 235 */ 236 int32_t pos(void) const; 237 238 /** 191 239 \return Quality of base \a i 192 240 */ … … 204 252 205 253 /** 206 \return query name 207 208 Length of array is described by core().l_qname 209 */ 210 const char* name(void) const; 211 212 /** 213 \brief modify name 214 215 \since New in yat 0.11 216 */ 217 void name(const std::string& n); 254 Each character in returned sequence is either A, C, G, T, or N. 255 256 \return sequence 257 */ 258 std::string sequence(void) const; 259 260 /** 261 4-bit integer describing base \a index 262 263 \see bam_nt16_rev_table 264 */ 265 uint8_t sequence(size_t index) const; 266 267 /** 268 \brief modify a base in sequence 269 270 Set i-th base in sequence to \a x, where seq is a 4-bit integer. 271 272 \see bam_nt16_table 273 274 \since New in yat 0.11 275 */ 276 void sequence(size_t i, uint8_t x); 277 278 /** 279 \brief set sequence and quality 280 281 \since New in yat 0.11 282 */ 283 void sequence(const std::string& seq, const std::vector<uint8_t>& qual); 284 285 /** 286 \see core().l_qseq 287 */ 288 uint32_t sequence_length(void) const; 289 290 /** 291 Exchanging this read with \a other. 292 293 \see swap(BamRead&, BamRead&) 294 */ 295 void swap(BamRead& other); 218 296 219 297 /** … … 221 299 */ 222 300 int32_t tid(void) const; 223 224 /**225 \brief 0-based laftmost coordinate226 */227 int32_t pos(void) const;228 229 /**230 \brief rightmost coordinate231 232 Coordinate is 0-based, i.e., the end is one passed the last233 matching position.234 235 \see bam_calend236 */237 int32_t end(void) const;238 239 /**240 \brief Chromosome ID for mate241 */242 int32_t mtid(void) const;243 244 /**245 \brief leftmost position for mate246 */247 int32_t mpos(void) const;248 249 /**250 Each character in returned sequence is either A, C, G, T, or N.251 252 \return sequence253 */254 std::string sequence(void) const;255 256 /**257 4-bit integer describing base \a index258 259 \see bam_nt16_rev_table260 */261 uint8_t sequence(size_t index) const;262 263 /**264 \brief modify a base in sequence265 266 Set i-th base in sequence to \a x, where seq is a 4-bit integer.267 268 \see bam_nt16_table269 270 \since New in yat 0.11271 */272 void sequence(size_t i, uint8_t x);273 274 /**275 \brief set sequence and quality276 277 \since New in yat 0.11278 */279 void sequence(const std::string& seq, const std::vector<uint8_t>& qual);280 281 /**282 \see core().l_qseq283 */284 uint32_t sequence_length(void) const;285 286 /**287 \brief bitwise flag288 289 \see Preprocessor defines BAM_F*290 */291 uint16_t flag(void) const;292 293 /**294 Exchanging this read with \a other.295 296 \see swap(BamRead&, BamRead&)297 */298 void swap(BamRead& other);299 301 300 302 private:
Note: See TracChangeset
for help on using the changeset viewer.