Skip to content

Commit

Permalink
v0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bluenote-1577 committed Jun 15, 2023
1 parent d9da3f1 commit 5f03545
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
### v0.1.3 (pre)released - 2023-05-09
### v0.1.4 released - 2023-06-14

#### Major
* skani triangle had a bug where if more than 5000 queries were present and --sparse or -E was not specified, the intermediate batch of 5000 queries would be written in sparse mode.
* skani triangle -o was giving different upper triangle matrix instead of lower triangle (skani triangle > res gives lower triangle). Matrices are consistently lower triangle now.
* Changed to lto = true for release mode. I see anywhere from a 5-10% speedup for this.

#### Minor
* Changed some dependencies so no more dependencies on old crates that will deprecate.

### v0.1.3 released - 2023-05-09

#### Major
* Fixed a bug where memory was blowing up in `dist` and `triangle` when the marker-index was activated. For big datasets, there could be > 100 GBs of wasted memory.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "skani"
version = "0.1.3"
version = "0.1.4"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "skani is a fast tool for calculating ANI between metagenomic sequences, such as metagenome-assembled genomes (MAGs). It is extremely fast and is robust against incompleteness and fragmentation, giving accurate ANI estimates."
Expand Down
4 changes: 2 additions & 2 deletions src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ fn get_anchors(
for anchor in anchors {
if last_query_contig != anchor.query_contig || anchor.query_pos > curr_end_point {
if query_positions_all[last_query_contig as usize].is_empty() {
warn!("{}", &query_sketch.contigs[(last_query_contig as usize)]);
warn!("{}", &query_sketch.contigs[last_query_contig as usize]);
continue;
}
let mut _num_seeds_in_block = 0;
Expand Down Expand Up @@ -800,7 +800,7 @@ fn get_anchors(
let mut seed_pos_in_block = vec![];
loop {
if query_positions_all[last_query_contig as usize].is_empty() {
warn!("{}", &query_sketch.contigs[(last_query_contig as usize)]);
warn!("{}", &query_sketch.contigs[last_query_contig as usize]);
continue;
}
if running_counter >= query_positions_all[last_query_contig as usize].len() {
Expand Down
2 changes: 1 addition & 1 deletion src/file_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ pub fn write_phyllip_matrix(
write!(&mut af_file, "{}", name).unwrap();
let end = sketches.len();
for j in 0..end {
let full_cond = (full_matrix && i >= j) || (i < j);
let full_cond = (full_matrix && i >= j) || (i > j);
if i == j {
if full_cond {
write!(&mut ani_file, "\t{:.2}", perfect).unwrap();
Expand Down
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
fn main() {
let matches = Command::new("skani")
.setting(AppSettings::ArgRequiredElseHelp)
.version("0.1.3")
.version("0.1.4")
.about("fast, robust ANI calculation and database searching for metagenomic contigs and assemblies. \n\nQuick ANI calculation:\nskani dist genome1.fa genome2.fa \n\nMemory-efficient database search:\nskani sketch genomes/* -o database; skani search -d database query1.fa query2.fa ...\n\nAll-to-all comparison:\nskani triangle genomes/*")
.subcommand(
SubCommand::with_name("help").setting(AppSettings::Hidden)
Expand Down Expand Up @@ -112,7 +112,7 @@ fn main() {
)

.help_heading("MISC")
.arg(Arg::new("v").short('v').help("Debug level verbosity."))
.arg(Arg::new("v").short('v').long("debug").help("Debug level verbosity."))
.arg(Arg::new("trace").long("trace").help("Trace level verbosity."))

)
Expand Down Expand Up @@ -299,7 +299,7 @@ fn main() {
.help(H_NO_FULL_INDEX),
)
.help_heading("MISC")
.arg(Arg::new("v").short('v').help("Debug level verbosity."))
.arg(Arg::new("v").short('v').long("debug").help("Debug level verbosity."))
.arg(Arg::new("trace").long("trace").help("Trace level verbosity."))
)
.subcommand(
Expand Down Expand Up @@ -451,7 +451,7 @@ fn main() {
.help("Estimate median identity instead of average (mean) identity."),
)
.help_heading("MISC")
.arg(Arg::new("v").short('v').help("Debug level verbosity."))
.arg(Arg::new("v").short('v').long("debug").help("Debug level verbosity."))
.arg(Arg::new("trace").long("trace").help("Trace level verbosity."))
)
.subcommand(
Expand Down Expand Up @@ -571,7 +571,7 @@ fn main() {
.help("Estimate median identity instead of average (mean) identity."),
)
.help_heading("MISC")
.arg(Arg::new("v").short('v').help("Debug level verbosity."))
.arg(Arg::new("v").short('v').long("debug").help("Debug level verbosity."))
.arg(Arg::new("trace").long("trace").help("Trace level verbosity."))

)
Expand Down
2 changes: 1 addition & 1 deletion src/triangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub fn triangle(command_params: CommandParams, mut sketch_params: SketchParams)
}
if c % 100 == 0 && c != 0 {
info!("{} query sequences processed.", c);
if c % INTERMEDIATE_WRITE_COUNT == 0 && c != 0 {
if c % INTERMEDIATE_WRITE_COUNT == 0 && c != 0 && command_params.sparse{
let moved_anis: FxHashMap<_,_>;
{
let mut locked = anis.lock().unwrap();
Expand Down

0 comments on commit 5f03545

Please sign in to comment.