File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ jobs:
107107 needs : tag-bin
108108 strategy :
109109 matrix :
110- os : [ubuntu-latest, windows-latest, macos-13 ]
110+ os : [ubuntu-latest, windows-latest, macos-latest ]
111111 arch : [x86_64, aarch64]
112112 exclude :
113113 - os : windows-latest
@@ -120,7 +120,7 @@ jobs:
120120 matrix.arch == 'x86_64' && 'x86_64-unknown-linux-gnu' ||
121121 matrix.arch == 'aarch64' && 'aarch64-unknown-linux-gnu'
122122 ) || matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' ||
123- matrix.os == 'macos-13 ' && (
123+ matrix.os == 'macos-latest ' && (
124124 matrix.arch == 'x86_64' && 'x86_64-apple-darwin' ||
125125 matrix.arch == 'aarch64' && 'aarch64-apple-darwin'
126126 ) }}
Original file line number Diff line number Diff line change @@ -27,14 +27,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727- added function ` Profile::from_blosum62_and_seq() `
2828
2929### Changed
30- - removed transition index constants under ` Profile ` namespace
30+ - Profile::from_blosum_62_and_seq() now estimates tau with a closed-form solution
3131- renamed ` Profile.forward_tau ` and ` Profile.forward_lambda ` to ` fwd_tau ` and ` fwd_lambda `
3232- renamed ` Profile.consensus_sequence_bytes_utf8 ` to ` consensus_seq_bytes_utf8 `
3333- moved ` Alphabet ` and` AminoAcid ` to mod ` alphabet `
3434- split self mutating functions from trait ` VecMath ` into new trait ` VecMathMut `
3535- struct ` Seed ` now has ` prf ` , ` seq ` , ` e_value ` fields (probably temporary)
3636
3737### Removed
38+ - removed transition index constants under ` Profile ` namespace
3839- removed ` Hmm ` struct
3940- removed function ` Profile::new() `
4041
Original file line number Diff line number Diff line change 11[package ]
22name = " libnail"
3- version = " 0.5 .0"
3+ version = " 0.4 .0"
44authors = [" Jack Roddy <jack.w.roddy@gmail.com>" ]
55edition = " 2021"
66license = " BSD-3-Clause"
Original file line number Diff line number Diff line change @@ -788,12 +788,24 @@ impl Profile {
788788 } )
789789 . sum :: < f32 > ( ) ;
790790
791- prf. fwd_tau ( 0.0 ) ;
791+ // note: we could get also get a pretty good approximation for
792+ // lambda by simply using the product of the length of the
793+ // sequence and the mean relative entropy of blosum62
792794 prf. fwd_lambda ( std:: f32:: consts:: LN_2 + 1.44 / total_entropy) ;
793795
794- let mut prf = prf. build ( ) ?;
795- prf. calibrate_tau ( 200 , 100 , 0.04 ) ;
796- Ok ( prf)
796+ // tau
797+ // note: this all comes from some experimentation fitting ~200k
798+ // sequences to learn a closed form solution for tau
799+ const KL_BLOSUM62 : f32 = 0.589 ;
800+ const MAGIC_TAU_1 : f32 = 0.662 ;
801+ const MAGIC_TAU_2 : f32 = 1.317 ;
802+ const MAGIC_TAU_3 : f32 = 2.147 ;
803+ let tau = -( ( -MAGIC_TAU_1 * KL_BLOSUM62 ) + ( MAGIC_TAU_2 * ( seq. length as f32 ) . ln ( ) )
804+ - MAGIC_TAU_3 ) ;
805+
806+ prf. fwd_tau ( tau) ;
807+
808+ prf. build ( )
797809 }
798810
799811 pub fn relative_entropy ( & self ) -> f32 {
Original file line number Diff line number Diff line change 11[package ]
22name = " nail"
3- version = " 0.5 .0"
3+ version = " 0.4 .0"
44authors = [" Jack Roddy <jack.w.roddy@gmail.com>" ]
55edition = " 2021"
66license = " BSD-3-Clause"
@@ -20,7 +20,7 @@ jemalloc = ["jemallocator"]
2020[dependencies ]
2121jemallocator = { version = " 0.3" , optional = true }
2222clap = { version = " 4.5.23" , features = [" derive" , " wrap_help" ] }
23- libnail = { path = " ../libnail" , version = " 0.5 .0" }
23+ libnail = { path = " ../libnail" , version = " 0.4 .0" }
2424anyhow = " 1.0.66"
2525thiserror = " 1.0.37"
2626rayon = " 1.7.0"
You can’t perform that action at this time.
0 commit comments