Skip to content

Commit 61b391f

Browse files
committed
removed deprecated code
1 parent 1388663 commit 61b391f

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

src/bam/flags.rs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -82,48 +82,3 @@ pub fn is_in_flag(flag: u16, in_: u16) -> bool {
8282
}
8383
true
8484
}
85-
86-
/* Deprecated
87-
pub fn check_flag(flag: u16, in_: u16, not_in: u16) -> bool {
88-
//! This function uses bitwise operations to test if flags are set or not.
89-
//!
90-
//! # Arguments
91-
//!
92-
//! * `flag`: u16 - The record flag you want to test
93-
//! * `in_`: u16 - The flags you want to check if they are set (use 0 for no test)
94-
//! * `not_in`: u16 - The flags you want to check if they are not set (use 0 for no test)
95-
//!
96-
//! # Usage:
97-
//! example: let test if a flag is both paired and first in pair
98-
//! ```
99-
//! use rust_htslib::bam::flags::{Flag, check_flag};
100-
//! let read_flag = 65;
101-
//! assert_eq!(check_flag(read_flag, Flag::PAIRED + Flag::FIRST_IN_PAIR, 0), true);
102-
//! ```
103-
//! let test that the read is mapped. READ_UNMAPPED
104-
//! ```
105-
//! use rust_htslib::bam::flags::{Flag, check_flag};
106-
//! let read_flag = 18;
107-
//! assert_eq!(check_flag(read_flag, 0, Flag::READ_UNMAPPED), true);
108-
//! ```
109-
//!
110-
//! Finally let do a more complexe real example test:
111-
//! ```
112-
//! use rust_htslib::bam::flags::{Flag, check_flag};
113-
//! let read_flag = 19;
114-
//! assert_eq!(check_flag(read_flag, Flag::PAIRED + Flag::PROPERLY_PAIRED + Flag::READ_RERVERSE , Flag::READ_UNMAPPED + Flag::MATE_UNMAPPED), true);
115-
//! ```
116-
//!
117-
//binary flag check
118-
//assert that: - in_ is in n
119-
// - not_in is not in n
120-
// bitwise operation
121-
if (not_in & flag) != 0 {
122-
return false;
123-
}
124-
if (in_ & flag) != in_ {
125-
return false;
126-
}
127-
return true;
128-
}
129-
*/

0 commit comments

Comments
 (0)