Skip to content

Commit 4e3960a

Browse files
setting read is a rich as 1 by default, to match the abismal standard
1 parent 4501b6e commit 4e3960a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

bisulfite_utils.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,29 @@ namespace bsflags {
2929
// ADS: this is our addition to the SAM flags, using the "free" bits
3030
/* 4096 0x1000 read is A-rich
3131
*/
32-
static const uint16_t read_is_t_rich = 0x1000;
32+
static const uint16_t read_is_a_rich = 0x1000;
3333
}
3434

3535
inline bool
3636
is_t_rich(const sam_rec &sr) {
37-
return samflags::check(sr.flags, bsflags::read_is_t_rich);
37+
return !samflags::check(sr.flags, bsflags::read_is_a_rich);
3838
}
3939

4040
inline bool
4141
is_a_rich(const sam_rec &sr) {
42-
return !samflags::check(sr.flags, bsflags::read_is_t_rich);
42+
return samflags::check(sr.flags, bsflags::read_is_a_rich);
4343
}
4444

4545
inline void
4646
set_t_rich(sam_rec &sr) {
47-
samflags::set(sr.flags, bsflags::read_is_t_rich);
47+
samflags::unset(sr.flags, bsflags::read_is_a_rich);
4848
}
4949

5050
inline void
5151
set_a_rich(sam_rec &sr) {
52-
samflags::unset(sr.flags, bsflags::read_is_t_rich);
52+
samflags::set(sr.flags, bsflags::read_is_a_rich);
5353
}
5454

55-
5655
void
5756
bisulfite_treatment(std::mt19937 &generator, std::string &seq,
5857
double bs_rate = 1.0, double meth_rate = 0.0);

0 commit comments

Comments
 (0)