Skip to content

Commit

Permalink
fix: update segment ordering to match bedtools ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
noamteyssier committed Apr 5, 2024
1 parent 53bab87 commit fe2d2df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/bam/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const LAST_SEGMENT: &[u8] = &[b'/', b'2'];
pub fn parse_query_name(record: &Record) -> Result<Vec<u8>> {
let name = record.qname();
if record.is_paired() {
if record.is_reverse() {
Ok([name, LAST_SEGMENT].concat())
} else {
if record.is_first_in_template() {
Ok([name, FIRST_SEGMENT].concat())
} else {
Ok([name, LAST_SEGMENT].concat())
}
} else {
Ok(name.to_vec())
Expand Down

0 comments on commit fe2d2df

Please sign in to comment.