Skip to content

Commit

Permalink
update deps, fix unique counting in bam mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Patro committed Nov 14, 2024
1 parent 9887160 commit f99b913
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ categories = ["command-line-utilities", "science"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
seqcol_rs = { git = "https://github.com/COMBINE-lab/seqcol_rs", branch = "dev", version = "0.1.2" }
anyhow = "1.0.86"
bstr = "1.10.0"
seqcol_rs = { git = "https://github.com/COMBINE-lab/seqcol_rs", branch = "dev", version = "0.1.3" }
anyhow = "1.0.93"
bstr = "1.11.0"
bio-types = { version = "1.0.4", features = ["serde"] }
clap = { version = "4.5.16", features = ["derive"] }
noodles-bam = "0.66.0"
noodles-sam = "0.63.0"
clap = { version = "4.5.21", features = ["derive"] }
noodles-bam = "0.70.0"
noodles-sam = "0.66.0"
num-format = "0.4.4"
lz4 = "1.28.0"
either = "1.13.0"
Expand All @@ -44,9 +44,9 @@ statrs = "0.17"
csv = "1.3"
serde = { version = "1", features = ["derive"] }
itertools = "0.13.0"
serde_json = "1.0.127"
serde_json = "1.0.132"
path-tools = "0.1.0"
atomic_float = "1.0.0"
atomic_float = "1.1.0"
sendable-swapvec = "0.4.3"
rand = "0.8.5"
arrow2 = { version = "0.18.0", features = [
Expand All @@ -56,21 +56,21 @@ arrow2 = { version = "0.18.0", features = [
"io_parquet_snappy",
] }
kders = { git = "https://github.com/COMBINE-lab/kde-rs.git", branch = "dev", version = "0.1.1" }
noodles-bgzf = { version = "0.32.0" }
noodles-bgzf = { version = "0.33.0" }
crossbeam = { version = "0.8.4", features = [
"crossbeam-queue",
"crossbeam-channel",
] }
sprs = "0.11.1"
sprs = "0.11.2"
minimap2-sys = { version = "0.1.19" }
# rely on minimap2-temp until upstream version is pushed
# make sure relevant changes are in upstream PR
minimap2-temp = { version = "0.1.32" }
# alternative sources for dev
#minimap2-temp = { version = "0.1.20", git = "https://github.com/rob-p/minimap2-rs.git", branch = "alignment-score" }
#minimap2 = { version = "0.1.20", git = "https://github.com/jguhlin/minimap2-rs.git", branch = "alignment-score" }
needletail = "0.5.1"
indicatif = "0.17.8"
needletail = "0.6.0"
indicatif = "0.17.9"
rustc-hash = "2.0.0"

[[bin]]
Expand Down
12 changes: 6 additions & 6 deletions src/alignment_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ pub fn parse_alignments<R: io::BufRead>(
if !prev_read.is_empty() {
if store.add_group(txps, &mut records_for_read) {
add_read_name(&records_for_read);
}
if records_for_read.len() == 1 {
store.inc_unique_alignments();
if records_for_read.len() == 1 {
store.inc_unique_alignments();
}
}
records_for_read.clear();
}
Expand Down Expand Up @@ -343,9 +343,9 @@ pub fn parse_alignments<R: io::BufRead>(
// if we are using read names and we added the group here
if store.add_group(txps, &mut records_for_read) {
add_read_name(&records_for_read);
}
if records_for_read.len() == 1 {
store.inc_unique_alignments();
if records_for_read.len() == 1 {
store.inc_unique_alignments();
}
}
records_for_read.clear();
}
Expand Down
6 changes: 3 additions & 3 deletions src/bulk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,15 +534,15 @@ pub fn quantify_bulk_alignments_raw_reads(
None
};

if ag.len() == 1 {
store.inc_unique_alignments();
}
if store.add_filtered_group(ag, as_probs, txps_mut) {
if let Some(ref mut nvec) = name_vec {
let read_name = read_name_opt.unwrap_or(EMPTY_READ_NAME.to_string());
nvec.push(read_name)
.expect("cannot push name to read name vector");
}
if ag.len() == 1 {
store.inc_unique_alignments();
}
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/util/oarfish_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ impl<T: NoodlesAlignmentLike + noodles_sam::alignment::Record> AlnRecordLike for
}

fn aln_span(&self) -> Option<usize> {
self.alignment_span().expect("valid span")
// NOTE: The transpose here is because noodles_sam
// switched from returning Result<Option<usize>> to
// Option<Result<usize>> --- think if there is a
// better way to handle the new return type directly
self.alignment_span().transpose().expect("valid span")
}

fn aln_score(&self) -> Option<i64> {
Expand Down

0 comments on commit f99b913

Please sign in to comment.