Skip to content

Commit

Permalink
fix: add back MW fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
carrascomj committed Oct 24, 2023
1 parent e778c0c commit ddcd3fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions geckopy/experimental/molecular_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ddcd3fb

Please sign in to comment.