Skip to content

Commit

Permalink
Merge pull request #10 from cbg-ethz/feature/aggregate
Browse files Browse the repository at this point in the history
feature/aggregate_locations
  • Loading branch information
gordonkoehn authored Nov 7, 2024
2 parents fb46e91 + bfe1c4b commit 53a8b7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mutation_freq.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def filter_by_location(data, location):

# Dropdown to select a location
locations = [
'Aggregate (All Locations)',
'Lugano (TI)',
'Zürich (ZH)',
'Chur (GR)',
Expand Down Expand Up @@ -163,7 +164,8 @@ def filter_by_location(data, location):
try:
mutation_data = yaml.safe_load(mutation_config)
filtered_data = filter_for_variant(tallymut, mutation_data)
filtered_data = filter_by_location(filtered_data, selected_location)
if selected_location != 'Aggregate (All Locations)':
filtered_data = filter_by_location(filtered_data, selected_location)
plot_heatmap(filtered_data, location=selected_location)
except yaml.YAMLError as e:
st.error(f"Error parsing YAML: {e}")

0 comments on commit 53a8b7f

Please sign in to comment.