Skip to content

Commit

Permalink
Found bug if there are no protein features. Fixed it by skipping if h…
Browse files Browse the repository at this point in the history
…gvs_p is None.
  • Loading branch information
lnrekerle committed Oct 2, 2024
1 parent ed12979 commit 5508f7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gpsea/view/_protein_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def _prepare_context(self, cohort: Cohort) -> typing.Mapping[str, typing.Any]:
fields = hgvs_p.split(":")
if len(fields) == 2:
hgvs_p = fields[1]
else:
continue
target_region = target_annot.protein_effect_location
if target_region is None:
# can happen for certain variant classes such as splice variant. Not an error
Expand Down Expand Up @@ -105,7 +107,7 @@ def _prepare_context(self, cohort: Cohort) -> typing.Mapping[str, typing.Any]:
'variants': variant_list,
}
)

non_feature_count = len(non_feature_to_variant_list)
non_feature_variants = "; ".join(set(non_feature_to_variant_list))

Expand Down

0 comments on commit 5508f7e

Please sign in to comment.