Changeset 4334
- Timestamp:
- Mar 25, 2023, 4:32:55 AM (2 months ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/Makefile.am
r4332 r4334 109 109 test/ncc.test \ 110 110 test/needleman_wunsch.test \ 111 test/needleman_wunsch2.test \ 111 112 test/negative_binomial.test \ 112 113 test/negative_binomial_mixture.test \ -
trunk/yat/utility/Aligner.cc
r4308 r4334 157 157 158 158 159 double Aligner::insertion_penalty(void) const 160 { 161 return vertical_gap_; 162 } 163 164 165 double Aligner::open_insertion_penalty(void) const 166 { 167 return open_vertical_gap_; 168 } 169 170 171 double Aligner::deletion_penalty(void) const 172 { 173 return horizon_gap_; 174 } 175 176 177 double Aligner::open_deletion_penalty(void) const 178 { 179 return open_horizon_gap_; 180 } 181 182 159 183 // ================ Cigar ======================= 160 184 … … 315 339 316 340 341 Aligner::Cigar::const_reverse_iterator Aligner::Cigar::rbegin(void) const 342 { 343 return const_reverse_iterator(cigar_.rbegin()); 344 } 345 346 317 347 uint32_t Aligner::Cigar::reference_length(void) const 318 348 { 319 349 return length(2); 350 } 351 352 353 Aligner::Cigar::const_reverse_iterator Aligner::Cigar::rend(void) const 354 { 355 return const_reverse_iterator(cigar_.rend()); 320 356 } 321 357 … … 337 373 assert(i<cigar_.size()); 338 374 return cigar_[i]; 375 } 376 377 378 bool Aligner::Cigar::operator==(const Aligner::Cigar& other) const 379 { 380 return cigar_ == other.cigar_; 381 } 382 383 384 bool Aligner::Cigar::operator!=(const Aligner::Cigar& other) const 385 { 386 return cigar_ != other.cigar_; 339 387 } 340 388 -
trunk/yat/utility/Aligner.h
r4207 r4334 86 86 vertical_gap. 87 87 88 \param horizon _gap Penalty for extending a horizontal gap89 90 \param open_horizon _gap Penalty for open a horizontal88 \param horizontal_gap Penalty for extending a horizontal gap 89 90 \param open_horizontal_gap Penalty for open a horizontal 91 91 gap. Total penalty for a horizontal gap is open_horizon_gap + N 92 92 * horizon_gap. 93 93 */ 94 94 Aligner(double vertical_gap, double open_vertical_gap, 95 double horizon _gap, double open_horizon_gap);95 double horizontal_gap, double open_horizontal_gap); 96 96 97 97 /** … … 192 192 193 193 /** 194 \since New in yat 0.21 195 */ 196 typedef 197 CigarIterator<std::deque<uint32_t>::const_reverse_iterator> 198 const_reverse_iterator; 199 200 /** 194 201 Default constructor 195 202 */ … … 289 296 290 297 /** 298 \return reverse iterator pointing to the beginning 299 300 \since New in yat 0.21 301 */ 302 const_reverse_iterator rbegin(void) const; 303 304 /** 291 305 \brief Translate CIGAR to a reference length. 292 306 … … 301 315 302 316 /** 317 \return reverse iterator pointing to the end 318 319 \since New in yat 0.21 320 */ 321 const_reverse_iterator rend(void) const; 322 323 /** 303 324 \brief reverse the CIGAR 304 325 … … 316 337 */ 317 338 size_t size(void) const; 339 340 /** 341 \since New in yat 0.21 342 */ 343 bool operator==(const Cigar& other) const; 344 345 /** 346 \since New in yat 0.21 347 */ 348 bool operator!=(const Cigar& other) const; 318 349 private: 319 350 std::deque<uint32_t> cigar_; … … 337 368 const Cigar cigar(size_t i, size_t j) const; 338 369 370 /** 371 Same as vertical_gap in Constructor 372 373 \since New in yat 0.21 374 */ 375 double insertion_penalty(void) const; 376 377 /** 378 Same as open_vertical_gap in Constructor 379 380 \since New in yat 0.21 381 */ 382 double open_insertion_penalty(void) const; 383 384 /** 385 Same as horizontal_gap in Constructor 386 387 \since New in yat 0.21 388 */ 389 double deletion_penalty(void) const; 390 391 /** 392 Same as open_horizontal_gap in Constructor 393 394 \since New in yat 0.21 395 */ 396 double open_deletion_penalty(void) const; 339 397 private: 340 398 direction& directions(size_t i, size_t j); -
trunk/yat/utility/Cigar.h
r4005 r4334 82 82 // 2, (3rd column below) is 1 iff operation consumes reference 83 83 // sequence. 84 // 85 // CIGAR Type Reference Query String 86 // BAM_CMATCH 3 1 1 M 87 // BAM_CINS 1 0 1 I 88 // BAM_CDEL 2 1 0 D 89 // BAM_CREF_SKIP 2 1 0 N 90 // BAM_CSOFT_CLIP 1 0 1 S 91 // BAM_CHARD_CLIP 0 0 0 H 92 // BAM_CPAD 0 0 0 P 93 // BAM_CEQUAL 3 1 1 = 94 // BAM_CDIFF 3 1 1 X 95 // BAM_CBACK 0 0 0 B 84 96 #define bam_cigar_type(o) (BAM_CIGAR_TYPE>>((o)<<1)&3) 85 97 #endif // end of backport -
trunk/yat/utility/Makefile.am
r4280 r4334 53 53 yat/utility/MultiMinimizer.cc \ 54 54 yat/utility/MultiMinimizerDerivative.cc \ 55 yat/utility/NeedlemanWunsch.cc \ 55 56 yat/utility/NelderMeadSimplex.cc \ 56 57 yat/utility/NelderMeadSimplex2.cc \ … … 144 145 $(srcdir)/yat/utility/MultiMinimizerDerivative.h \ 145 146 $(srcdir)/yat/utility/multiprocess.h \ 147 $(srcdir)/yat/utility/NeedlemanWunsch.h \ 146 148 $(srcdir)/yat/utility/NelderMeadSimplex.h \ 147 149 $(srcdir)/yat/utility/NelderMeadSimplex2.h \
Note: See TracChangeset
for help on using the changeset viewer.