Skip to content

Commit

Permalink
Add in selenocysteine and pyrrolysine amino acids
Browse files Browse the repository at this point in the history
- Bump to v0.5.1
  • Loading branch information
lazear committed Oct 31, 2022
1 parent d603ff1 commit 6153471
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 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.5.0"
version = "0.5.1"
authors = ["Michael Lazear <[email protected]"]
edition = "2021"
rust-version = "1.62"
Expand Down
2 changes: 1 addition & 1 deletion crates/sage-cloudpath/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sage-cloudpath"
version = "0.5.0"
version = "0.5.1"
authors = ["Michael Lazear <[email protected]"]
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.5.0"
version = "0.5.1"
authors = ["Michael Lazear <[email protected]"]
edition = "2021"
rust-version = "1.62"
Expand Down
8 changes: 5 additions & 3 deletions crates/sage/src/mass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ impl Mass for Residue {
}
}

pub const VALID_AA: [char; 20] = [
pub const VALID_AA: [char; 22] = [
'A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W',
'Y',
'Y', 'U', 'O',
];

impl Mass for char {
Expand All @@ -82,7 +82,9 @@ impl Mass for char {
'W' => 186.079_32,
'Y' => 163.063_32,
'V' => 99.068_41,
_ => unreachable!("BUG: invalid amino acid"),
'U' => 150.95363,
'O' => 237.14773,
_ => unreachable!("BUG: invalid amino acid {}", self),
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/sage/src/ml/retention_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ pub struct RetentionModel {
pub rt_max: f64,
}

const FEATURES: usize = 63;
const N_TERMINAL: usize = 20;
const C_TERMINAL: usize = 40;
const FEATURES: usize = VALID_AA.len() * 3 + 3;
const N_TERMINAL: usize = VALID_AA.len() * 1;
const C_TERMINAL: usize = VALID_AA.len() * 2;
const PEPTIDE_LEN: usize = FEATURES - 3;
const PEPTIDE_MASS: usize = FEATURES - 2;
const INTERCEPT: usize = FEATURES - 1;
Expand Down

0 comments on commit 6153471

Please sign in to comment.