Skip to content

Commit ffb881b

Browse files
authored
Merge pull request #189 from wilhelm-lab/main
Main
2 parents 4db5047 + 26c5b3c commit ffb881b

File tree

8 files changed

+14
-11
lines changed

8 files changed

+14
-11
lines changed

.cookietemple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ full_name: Victor Giurcoiu
1515
email: victor.giurcoiu@tum.de
1616
project_name: spectrum_fundamentals
1717
project_short_description: Fundamentals public repo
18-
version: 0.8.0
18+
version: 0.8.1
1919
license: MIT

.github/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name-template: "0.8.0 " # <<COOKIETEMPLE_FORCE_BUMP>>
2-
tag-template: 0.8.0 # <<COOKIETEMPLE_FORCE_BUMP>>
1+
name-template: "0.8.1 " # <<COOKIETEMPLE_FORCE_BUMP>>
2+
tag-template: 0.8.1 # <<COOKIETEMPLE_FORCE_BUMP>>
33
exclude-labels:
44
- "skip-changelog"
55

cookietemple.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.8.0
2+
current_version = 0.8.1
33

44
[bumpversion_files_whitelisted]
55
init_file = spectrum_fundamentals/__init__.py

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
# the built documents.
5353
#
5454
# The short X.Y version.
55-
version = "0.8.0"
55+
version = "0.8.1"
5656
# The full version, including alpha/beta/rc tags.
57-
release = "0.8.0"
57+
release = "0.8.1"
5858

5959
# The language for content autogenerated by Sphinx. Refer to documentation
6060
# for a list of supported languages.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "spectrum_fundamentals"
3-
version = "0.8.0" # <<COOKIETEMPLE_FORCE_BUMP>>
3+
version = "0.8.1" # <<COOKIETEMPLE_FORCE_BUMP>>
44
description = "Fundamental functions, annotation pipeline and constants for oktoberfest"
55
authors = ["Wilhelmlab at Technical University of Munich"]
66
license = "MIT"

spectrum_fundamentals/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
__author__ = """The Oktoberfest development team (Wilhelmlab at Technical University of Munich)"""
66
__copyright__ = f"Copyright {datetime.now():%Y}, Wilhelmlab at Technical University of Munich"
77
__license__ = "MIT"
8-
__version__ = "0.8.0"
8+
__version__ = "0.8.1"
99

1010
import logging
1111
import logging.handlers

spectrum_fundamentals/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
@click.command()
8-
@click.version_option(version="0.8.0", message=click.style("spectrum_fundamentals Version: 0.8.0"))
8+
@click.version_option(version="0.8.1", message=click.style("spectrum_fundamentals Version: 0.8.1"))
99
def main() -> None:
1010
"""spectrum_fundamentals."""
1111

spectrum_fundamentals/fragments.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _get_modifications(peptide_sequence: str, custom_mods: Optional[Dict[str, fl
2929
:param custom_mods: mapping of custom UNIMOD string identifiers ('[UNIMOD:xyz]') to their mass
3030
:return: modification_deltas
3131
"""
32-
modification_deltas = {}
32+
modification_deltas: dict[int, float] = {}
3333
offset = 1 # shift position of mod start in seq by one to the left to reflect position of aa
3434
if peptide_sequence.startswith("["): # n-term mod => seq must be [UNIMOD:xyz]-X...
3535
offset = 2 # need to add one more offset, because of the dash '-', n_terminal stored at -1
@@ -44,7 +44,10 @@ def _get_modifications(peptide_sequence: str, custom_mods: Optional[Dict[str, fl
4444

4545
for match in matches:
4646
start_pos, end_pos = match.span()
47-
modification_deltas[start_pos - offset] = mod_masses[match.group()]
47+
if (start_pos - offset) in modification_deltas.keys():
48+
modification_deltas[start_pos - offset] += mod_masses[match.group()]
49+
else:
50+
modification_deltas[start_pos - offset] = mod_masses[match.group()]
4851
offset += end_pos - start_pos
4952

5053
return modification_deltas

0 commit comments

Comments
 (0)