Skip to content

Commit

Permalink
fixed deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaezp committed Apr 16, 2024
1 parent b593c1e commit 8132f6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spectrum_utils/proforma.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,9 @@ def parse(proforma: str) -> List[Proteoform]:
charge = match_unmod.group(2)
if charge is not None:
charge = Charge(int(charge[1:]))
return [Proteoform(sequence=match_unmod.group(1), charge=charge)]
return [
Proteoform(sequence=match_unmod.group(1).upper(), charge=charge)
]

parser = _build_parser()
# noinspection PyUnresolvedReferences
Expand Down Expand Up @@ -806,7 +808,9 @@ def _import_cv(
for synonym in term.get("synonym", []):
cv[synonym] = mass
# Save to the cache if enabled.
_store_in_cache(cache, f"{cv_id}.pkl", (cv, datetime.datetime.utcnow()))
_store_in_cache(
cache, f"{cv_id}.pkl", (cv, datetime.datetime.now(datetime.UTC))
)
return cv


Expand Down

0 comments on commit 8132f6b

Please sign in to comment.