From ddcd3fbc8825621aebb17bdee0b4b64417e04f8a Mon Sep 17 00:00:00 2001 From: carrascomj Date: Tue, 24 Oct 2023 11:17:56 +0200 Subject: [PATCH 1/2] fix: add back MW fallback --- geckopy/experimental/molecular_weights.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geckopy/experimental/molecular_weights.py b/geckopy/experimental/molecular_weights.py index b93f6f6..8988e3b 100644 --- a/geckopy/experimental/molecular_weights.py +++ b/geckopy/experimental/molecular_weights.py @@ -17,6 +17,7 @@ import gzip import io import re +from collections import defaultdict from time import sleep from typing import Callable, Dict, List, Optional @@ -87,6 +88,9 @@ def _molecular_weight(seq: str) -> float: """ seq = "".join(str(seq).split()).upper() # Do the minimum formatting weight_table = protein_weights + weight_table = defaultdict( + lambda: sum(weight_table.values()) / len(weight_table), weight_table + ) water = 18.010565 try: From 687c1d995cf2733dc9e2d3dfe953031efc53b986 Mon Sep 17 00:00:00 2001 From: carrascomj Date: Tue, 24 Oct 2023 11:32:08 +0200 Subject: [PATCH 2/2] chore: upgrade cobrapy --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 88bae03..d46826f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,7 +12,7 @@ version = 0.0.1 [options] zip_safe = True install_requires = - cobra~=0.25.0 + cobra~=0.27.0 pandas~=1.1.5 tqdm~=4.60 requests>=2