diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d781d..9876f23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.13.3] +### Fixed +- Bug in `database.enzyme.restrict` parameter, where `null` values were being overriden with "P" (causing Trypsin/P to behave like Trypsin) + ## [v0.13.2] ### Changed - Subtle change to TMT integration tolerance, and selection of which ion to quantify (most intense). As a result, TMT integration should be more in agreement (if not 100% so) with ProteomeDiscover/FragPipe/etc diff --git a/Cargo.lock b/Cargo.lock index 863174a..aacb6fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1450,7 +1450,7 @@ checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "sage-cli" -version = "0.13.2" +version = "0.13.3" dependencies = [ "anyhow", "clap", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "sage-core" -version = "0.13.2" +version = "0.13.3" dependencies = [ "async-compression", "base64 0.13.1", diff --git a/crates/sage-cli/Cargo.toml b/crates/sage-cli/Cargo.toml index 85dd581..87e886d 100644 --- a/crates/sage-cli/Cargo.toml +++ b/crates/sage-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sage-cli" -version = "0.13.2" +version = "0.13.3" authors = ["Michael Lazear for EnzymeParameters { max_len: en.max_len.unwrap_or(50), enyzme: Enzyme::new( &en.cleave_at.unwrap_or_else(|| "KR".into()), - en.restrict.or(Some('P')), + en.restrict, en.c_terminal.unwrap_or(true), ), } @@ -628,4 +628,23 @@ mod test { vec!["sp|AAAAA".to_string().into()] ); } + + #[test] + fn deserialize_enzyme_builder() -> Result<(), serde_json::Error> { + let a: EnzymeBuilder = serde_json::from_value(serde_json::json!({ + "cleave_at": "KR", + }))?; + let b: EnzymeBuilder = serde_json::from_value(serde_json::json!({ + "cleave_at": "KR", + "restrict": "P", + }))?; + + let a: EnzymeParameters = a.into(); + let b: EnzymeParameters = b.into(); + + assert_eq!(a.enyzme.and_then(|e| e.skip_suffix), None); + assert_eq!(b.enyzme.and_then(|e| e.skip_suffix), Some('P')); + + Ok(()) + } } diff --git a/crates/sage/src/enzyme.rs b/crates/sage/src/enzyme.rs index 076f24d..362fbe5 100644 --- a/crates/sage/src/enzyme.rs +++ b/crates/sage/src/enzyme.rs @@ -88,7 +88,7 @@ pub struct EnzymeParameters { pub struct Enzyme { // Skip cleaving if the site is followed matching this AA - skip_suffix: Option, + pub(crate) skip_suffix: Option, // Regex for matching cleavage sites regex: Regex, // Cleave at c-terminal?