Changeset 3356
- Timestamp:
- Nov 22, 2014, 2:34:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/pileup.cc
r3327 r3356 49 49 50 50 #ifdef YAT_HAVE_LIBBAM 51 char seq_nt16(size_t x) 52 { 53 #if YAT_HAVE_HTSLIB 54 return seq_nt16_str[x]; 55 #elif HAVE_BAM_NT16_REV_TABLE 56 return bam_nt16_rev_table[x]; 57 #else 58 std::string table = "=ACMGRSVTWYHKDBN"; 59 return table[c]; 60 #endif 61 } 62 51 63 void test1(test::Suite& suite, const std::string& fn) 52 64 { … … 102 114 continue; 103 115 } 104 str += bam_nt16_rev_table[iter->sequence()];116 str += seq_nt16(iter->sequence()); 105 117 } 106 118 … … 169 181 if (i->bam().pos()!=reads[1].pos()) 170 182 continue; 171 char nt = bam_nt16_rev_table[i->sequence()];183 char nt = seq_nt16(i->sequence()); 172 184 if (nt != ref[plp.pos()-reads[0].pos()]) { 173 185 error << "'" << nt << "' not equal '" … … 196 208 ++count; 197 209 suite.err() << count << "\n"; 198 char nt = bam_nt16_rev_table[i->sequence()];210 char nt = seq_nt16(i->sequence()); 199 211 if (nt != reads[1].sequence()[count-1]) 200 212 error << "nt: " << nt << " not as expected. count: " << count << "\n"; … … 239 251 continue; 240 252 ++count; 241 char nt = bam_nt16_rev_table[i->sequence()];253 char nt = seq_nt16(i->sequence()); 242 254 if (plp.pos() != reads[1].pos()+count-1) 243 255 error << "count: " << count << " with pos: " << plp.pos() << "\n"; … … 281 293 continue; 282 294 ++count; 283 char nt = bam_nt16_rev_table[i->sequence()];295 char nt = seq_nt16(i->sequence()); 284 296 if (plp.skip_ref()) 285 297 error << count << " unexpected skip_ref\n";
Note: See TracChangeset
for help on using the changeset viewer.