diff --git a/CHANGELOG.md b/CHANGELOG.md index bba996d..f6de664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ 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). +## [3.1.8] - 2025-02-21 + +### Changed + +- Allow for much smaller peptides in feature calculation + ## [3.1.7] - 2025-02-03 ### Changed diff --git a/deeplc/feat_extractor.py b/deeplc/feat_extractor.py index dbcf293..1b12262 100644 --- a/deeplc/feat_extractor.py +++ b/deeplc/feat_extractor.py @@ -412,7 +412,11 @@ def rolling_sum(a, n=2): ) for p in positions_pos: - aa = seq[p] + try: + aa = seq[p] + except: + warn_once(f"Unable to get the following position: {p}") + continue for atom, val in mass.std_aa_comp[aa].items(): try: matrix_pos[p, dict_index_pos[atom]] = val @@ -422,7 +426,11 @@ def rolling_sum(a, n=2): warn_once(f"Could not add the following atom: {p} {atom} {val}") for pn in positions_neg: - aa = seq[seq_len + pn] + try: + aa = seq[seq_len + pn] + except: + warn_once(f"Unable to get the following position: {p}") + continue for atom, val in mass.std_aa_comp[aa].items(): try: matrix_pos[pn, dict_index_pos[atom]] = val diff --git a/pyproject.toml b/pyproject.toml index 63822ef..31e8fe3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "deeplc" -version = "3.1.7" +version = "3.1.8" description = "DeepLC: Retention time prediction for (modified) peptides using Deep Learning." readme = "README.md" license = { file = "LICENSE" }