Skip to content

Commit

Permalink
Fix #4624 - show ExHu STR sizes again (#4625)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnil authored May 15, 2024
1 parent 3d50453 commit f57bd7d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Fixed
- Warning icon in case pages for individuals where `confirmed_sex` is false
- Warning icon in case pages for individuals where `confirmed_sex` is false
- Show allele sizes form ExpansionHunter on STR variantS page again

## [4.82.1]
### Fixed
Expand Down
6 changes: 2 additions & 4 deletions scout/server/blueprints/variants/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,6 @@ def parse_variant(
variant_obj["end_chrom"] = variant_obj["chromosome"]

# common motif count for STR variants

variant_obj["str_mc"] = get_str_mc(variant_obj)

# variant level links shown on variants page
Expand Down Expand Up @@ -970,7 +969,6 @@ def get_str_mc(variant_obj: dict) -> Optional[int]:
from the variant FORMAT field, or as a number given in the ALT on the form
'<STR123>'.
"""

alt_mc = None
if variant_obj["alternative"] == ".":
return alt_mc
Expand All @@ -982,9 +980,9 @@ def get_str_mc(variant_obj: dict) -> Optional[int]:
if alt_mc:
return alt_mc

alt_num = NUM.match(variant_obj["alternative"])
alt_num = NUM.search(variant_obj["alternative"])
if alt_num:
alt_mc = int(alt_num)
alt_mc = int(alt_num.group())
return alt_mc

return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<td class="str-link">{{ str_locus_info(variant) }}</td>
<td class="text-end">{{ variant.str_display_ru or variant.str_ru or variant.reference }}</td>
<td class="text-end"><b><span data-bs-toggle="tooltip" title="{{ variant.alternative }}">{{ variant.str_mc }}</span></b></td>
<td class="text-end"><span data-bs-toggle="tooltip" title="{{ variant.reference }}">{{ variant.str_ref or "." }}</span></td>
<td class="text-end"><span data-bs-toggle="tooltip" title="{{ variant.reference }}">{{ variant.str_ref or "." }}</span></td>
<td>{{ str_status(variant) }}</td>
<td>{% for sample in variant.samples %}
{% if sample.genotype_call != "./." %}
Expand Down

0 comments on commit f57bd7d

Please sign in to comment.