Skip to content

Commit

Permalink
v0.13.3 - fix cleavage inhibitor 'restrict' parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lazear committed Jun 27, 2023
1 parent 8927c96 commit da4312b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions 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 crates/sage-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sage-cli"
version = "0.13.2"
version = "0.13.3"
authors = ["Michael Lazear <michaellazear92@gmail.com"]
edition = "2021"
rust-version = "1.62"
Expand Down
2 changes: 1 addition & 1 deletion crates/sage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sage-core"
version = "0.13.2"
version = "0.13.3"
authors = ["Michael Lazear <michaellazear92@gmail.com"]
edition = "2021"
rust-version = "1.62"
Expand Down
21 changes: 20 additions & 1 deletion crates/sage/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl From<EnzymeBuilder> 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),
),
}
Expand Down Expand Up @@ -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(())
}
}
2 changes: 1 addition & 1 deletion crates/sage/src/enzyme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub struct EnzymeParameters {

pub struct Enzyme {
// Skip cleaving if the site is followed matching this AA
skip_suffix: Option<char>,
pub(crate) skip_suffix: Option<char>,
// Regex for matching cleavage sites
regex: Regex,
// Cleave at c-terminal?
Expand Down

0 comments on commit da4312b

Please sign in to comment.