From 6def18fa88dc70c708525b0b29f7650af47f8a02 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Sun, 16 Aug 2026 20:41:04 +0200 Subject: [PATCH] Add TNT configuration directives and tree export commands to script Updates the generated TNT script with configuration parameters and appends tree management commands for saving and exporting results. Modifications are strictly limited to string literals written to the output stream. --- src/Cargo.lock | 2 +- src/obikmer/Cargo.toml | 2 +- src/obikmer/src/cmd/phylo/tnt.rs | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Cargo.lock b/src/Cargo.lock index d3a61d54..9bf84ff4 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -1793,7 +1793,7 @@ dependencies = [ [[package]] name = "obikmer" -version = "1.1.44" +version = "1.2.0" dependencies = [ "clap", "csv", diff --git a/src/obikmer/Cargo.toml b/src/obikmer/Cargo.toml index 903c69db..34b4c9e3 100644 --- a/src/obikmer/Cargo.toml +++ b/src/obikmer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "obikmer" -version = "1.1.44" +version = "1.2.0" edition = "2024" [[bin]] diff --git a/src/obikmer/src/cmd/phylo/tnt.rs b/src/obikmer/src/cmd/phylo/tnt.rs index c3c13a08..334a8f16 100644 --- a/src/obikmer/src/cmd/phylo/tnt.rs +++ b/src/obikmer/src/cmd/phylo/tnt.rs @@ -46,6 +46,10 @@ pub(super) fn write_sankoff_tnt( let n_sites = alignment.sequences.first().map(|s| s.len()).unwrap_or(0); writeln!(f, "xread").unwrap(); + writeln!(f, "mxram 16000;").unwrap(); + writeln!(f, "taxname =;").unwrap(); + writeln!(f, "taxname +50;").unwrap(); + writeln!( f, "'obikmer central-position SNP families, calibrated Sankoff 16-state encoding'" @@ -166,9 +170,7 @@ pub(super) fn write_sankoff_tnt( writeln!(f, ";").unwrap(); writeln!(f, "hold 20;").unwrap(); writeln!(f, "mult;").unwrap(); - writeln!(f, "taxname =;").unwrap(); - writeln!(f, "tsave * {tre_name};").unwrap(); - writeln!(f, "tsave /;").unwrap(); + writeln!(f, "export - {tre_name};").unwrap(); info!( "TNT script → {path} (costs scaled x{cost_scale:.0}, runs a default `hold 20; mult;` \