Skip to content

Commit

Permalink
Merge pull request #1130 from nextstrain/build-specific-narrow-bandwidth
Browse files Browse the repository at this point in the history
Allow build-specific --narrow-bandwidth param in frequencies
  • Loading branch information
trvrb authored Oct 3, 2024
2 parents b2b23d1 + 6458357 commit faa85a7
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 185 deletions.
21 changes: 16 additions & 5 deletions defaults/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,29 @@ ancestral:
# Frequencies settings
frequencies:

# min_date is set by default to 1 year before present
# but can be explicitly set if desired
# default settings that can be over-ridden for specific builds
default:

# min_date is set by default to 1 year before present
min_date: "1Y"

# max_date is set by default to present date - recent_days_to_censor

# KDE bandwidths in proportion of a year to use per strain.
# using 1M bandwidth by default
narrow_bandwidth: 0.0833


# settings that can be over-ridden across all builds, but not for specific builds
recent_days_to_censor: 0

# Number of weeks between pivots
pivot_interval: 1

# Measure pivots in weeks
pivot_interval_units: "weeks"

# KDE bandwidths in proportion of a year to use per strain.
# using 15 day bandwidth
narrow_bandwidth: 0.041
# Weight of KDE that uses wide bandwidth
proportion_wide: 0.0

# Diffusion frequency settings
Expand Down
23 changes: 20 additions & 3 deletions docs/src/reference/workflow-config-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -983,13 +983,30 @@ columns

frequencies
-----------
- Valid attributes:
- type: object
- description: Parameters for specifying tip frequency calculations via ``augur frequencies``
- examples:

.. code:: yaml
frequencies:
pivot_interval_units: "weeks"
default:
min_date: "6M"
narrow_bandwidth: 0.038
global_1m:
min_date: "1M"
narrow_bandwidth: 0.019
global_2020_to_2022:
min_date: "2020-01-01"
max_date: "2022-01-01"
narrow_bandwidth: 0.076
Each named traits configuration (``default`` or build-named) supports specification of ``min_date``, ``max_date`` and ``narrow_bandwidth``. Other parameters can only be specified across all builds.

.. contents::
:local:

.. _min_date-1:

min_date
~~~~~~~~

Expand Down
59 changes: 3 additions & 56 deletions nextstrain_profiles/nextstrain-gisaid-21L/builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,115 +431,62 @@ traits:
# narrow_bandwidth = 0.019 or 7 days for "1m" and "2m"
# narrow_bandwidth = 0.038 or 14 days for "6m" and "all-time"
frequencies:
default:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
global_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
global_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
global_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
global_all-time:
min_date: "2022-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
africa_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
africa_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
africa_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
africa_all-time:
min_date: "2022-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
asia_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
asia_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
asia_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
asia_all-time:
min_date: "2022-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
europe_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
europe_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
europe_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
europe_all-time:
min_date: "2022-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
north-america_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
north-america_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
north-america_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
north-america_all-time:
min_date: "2022-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
oceania_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
oceania_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
oceania_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
oceania_all-time:
min_date: "2022-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
south-america_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
south-america_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
south-america_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
south-america_all-time:
min_date: "2022-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
59 changes: 1 addition & 58 deletions nextstrain_profiles/nextstrain-gisaid/builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,119 +422,62 @@ traits:
# narrow_bandwidth = 0.019 or 7 days for "1m" and "2m"
# narrow_bandwidth = 0.038 or 14 days for "6m" and "all-time"
frequencies:
reference:
default:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
global_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
global_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
global_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
global_all-time:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
africa_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
africa_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
africa_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
africa_all-time:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
asia_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
asia_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
asia_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
asia_all-time:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
europe_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
europe_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
europe_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
europe_all-time:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
north-america_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
north-america_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
north-america_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
north-america_all-time:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
oceania_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
oceania_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
oceania_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
oceania_all-time:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
south-america_1m:
min_date: "1M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
south-america_2m:
min_date: "2M"
narrow_bandwidth: 0.019
recent_days_to_censor: 7
south-america_6m:
min_date: "6M"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
south-america_all-time:
min_date: "2020-01-01"
narrow_bandwidth: 0.038
recent_days_to_censor: 7
Loading

0 comments on commit faa85a7

Please sign in to comment.