Skip to content

Commit c94bbab

Browse files
CGMossamanzt
andauthored
Update r-oxbow dependencies and replace deprecated APIs (#66)
* Update `r-oxbow` dependencies and replace deprecated APIs * fix(r-oxbow): repair unverified `partition_from_index_file` impl The implementation introduced in `5c329a6` attempted to return a `Vec<(u64, u16)>`, which is incompatible with `extendr` and was merged without verification. The function now correctly returns an R-compatible List with named components (`compressed_offset`, `bin_index`). --------- Co-authored-by: Trevor Manz <[email protected]>
1 parent 0df1395 commit c94bbab

File tree

3 files changed

+425
-166
lines changed

3 files changed

+425
-166
lines changed

oxbow/src/vpos.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ fn partition_from_index(index: &csi::Index, chunksize: u64) -> Vec<(u64, u16)> {
7878
continue;
7979
}
8080
let offsets = if rseq.linear_index().is_empty() {
81-
get_offsets_from_binning_index(&rseq)
81+
get_offsets_from_binning_index(rseq)
8282
} else {
83-
get_offsets_from_linear_index(&rseq)
83+
get_offsets_from_linear_index(rseq)
8484
};
8585
let consolidated = consolidate_chunks(&offsets, chunksize);
8686
partition.extend(consolidated);
@@ -114,6 +114,5 @@ fn parse_index_file(path: &str) -> io::Result<csi::Index> {
114114

115115
pub fn partition_from_index_file(path: &str, chunksize: u64) -> Vec<(u64, u16)> {
116116
let index = parse_index_file(path).unwrap();
117-
let partition = partition_from_index(&index, chunksize);
118-
partition
117+
partition_from_index(&index, chunksize)
119118
}

0 commit comments

Comments
 (0)