Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Index for bam::IndexedReader #387

Merged
merged 20 commits into from
May 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test for number_mapped_unmapped
  • Loading branch information
tedil committed May 2, 2023
commit 7ceb1ea1e4dc115e77d125e35cbdaf837b5cd5d0
8 changes: 8 additions & 0 deletions src/bam/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2906,4 +2906,12 @@ CCCCCCCCCCCCCCCCCCC"[..],
let actual = reader.index().stats(header).unwrap();
assert_eq!(expected, actual);
}

#[test]
fn test_number_mapped_and_unmapped() {
let mut reader = IndexedReader::from_path("test/test.bam").unwrap();
let expected = (6, 0);
let actual = reader.index().number_mapped_unmapped(0);
assert_eq!(expected, actual);
}
}