Skip to content

Commit

Permalink
Merge pull request #297 from monarch-initiative/protein_viewer_fix_bug
Browse files Browse the repository at this point in the history
Found bug if there are no protein features.
  • Loading branch information
pnrobinson authored Oct 3, 2024
2 parents ed12979 + 5508f7e commit cb10f3f
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 cb10f3f

Please sign in to comment.