diff --git a/src/gpsea/model/_protein.py b/src/gpsea/model/_protein.py index 178c86e1b..6db36e09a 100644 --- a/src/gpsea/model/_protein.py +++ b/src/gpsea/model/_protein.py @@ -368,19 +368,16 @@ def from_uniprot_json( regions = list() for feature in data["features"]: - try: - region_name = feature["description"] - locus = feature["location"] - region_start = int(locus["start"]["value"]) - 1 # convert to 0-based coordinates - region_end = int(locus["end"]["value"]) - feature_type = FeatureType.from_string(feature["type"]) - finfo = FeatureInfo( - name=region_name, region=Region(start=region_start, end=region_end) - ) - pfeature = ProteinFeature.create(info=finfo, feature_type=feature_type) - regions.append(pfeature) - except Exception as feature_exception: - print(f"Could not parse feature: {str(feature_exception)} (skipping)") + region_name = feature["description"] + locus = feature["location"] + region_start = int(locus["start"]["value"]) - 1 # convert to 0-based coordinates + region_end = int(locus["end"]["value"]) + feature_type = FeatureType.from_string(feature["type"]) + finfo = FeatureInfo( + name=region_name, region=Region(start=region_start, end=region_end) + ) + pfeature = ProteinFeature.create(info=finfo, feature_type=feature_type) + regions.append(pfeature) return ProteinMetadata( protein_id=protein_id,