Skip to content

Commit 3b5e2d0

Browse files
committed
Deprecate logistic_growth coloring and remove it from the workflow
The logistic growth analysis used frequencies of strains in the tree to estimate logistic growth rates. However, analyses at nextstrain.org/sars-cov-2/forecasts use all the available sequence data and provide a more sophisticated estimate of growth rate accounting for competition between circulating viruses. These updated results are available in the `mlr_lineage_fitness` analysis. The `mlr_lineage_fitness` results should be substantially more accurate.
1 parent 15bbd82 commit 3b5e2d0

File tree

8 files changed

+42
-118
lines changed

8 files changed

+42
-118
lines changed

defaults/auspice_config.json

-10
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@
3535
"title": "S1 mutations",
3636
"type": "continuous"
3737
},
38-
{
39-
"key": "logistic_growth",
40-
"title": "Logistic growth",
41-
"type": "continuous"
42-
},
43-
{
44-
"key": "current_frequency",
45-
"title": "Current frequency",
46-
"type": "continuous"
47-
},
4838
{
4939
"key": "mlr_lineage_fitness",
5040
"title": "MLR lineage fitness",

defaults/parameters.yaml

-16
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,6 @@ frequencies:
172172
stiffness: 20
173173
inertia: 0.2
174174

175-
# Logistic growth settings
176-
logistic_growth:
177-
# Calculate logistic growth over the last N pivots which corresponds to N
178-
# times the amount of time represented by the `pivot_interval_units` in the
179-
# frequencies configuration.
180-
delta_pivots: 6
181-
182-
# Set the minimum number of tips a clade must have before its logistic growth
183-
# is calculated.
184-
min_tips: 50
185-
186-
# Set the minimum and maximum current frequency a clade must for its logistic
187-
# growth to be calculated.
188-
min_frequency: 0.000001
189-
max_frequency: 0.95
190-
191175
# Cluster-specific settings
192176
cluster:
193177
# Require a minimum number of tips to be annotated as a cluster.

docs/src/reference/change_log.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ We also use this change log to document new features that maintain backward comp
77

88
- 23 January 2025: Include a new `mlr_lineage_fitness` coloring. This uses live estimates of lineage fitness from [nextstrain.org/sars-cov-2/forecasts](https://nextstrain.org/sars-cov-2/forecasts) to provide a strain-level coloring to the tree. The lineage fitness estimates are automatically updated as new data comes in and so this coloring should stay current. [PR 1169](https://github.com/nextstrain/ncov/pull/1169)
99

10+
- 23 January 2025: Deprecate previous fitness-related colorings of `mutational_fitness`, `logistic_growth` and `current_frequency` (used by logistic growth). The new `mlr_lineage_fitess` should be more accurate / more current than these previous approaches. [PR 1169](https://github.com/nextstrain/ncov/pull/1169)
11+
1012
## v15 (5 December 2024)
1113

1214
- 5 December 2024: Remove `run_pangolin` configuration option from the workflow, since the pangoLEARN tool that this enabled has been deprecated. [PR 1164](https://github.com/nextstrain/ncov/pull/1164)

docs/src/reference/workflow-config-file.rst

-40
Original file line numberDiff line numberDiff line change
@@ -1097,46 +1097,6 @@ inertia
10971097
- Unused
10981098

10991099

1100-
logistic_growth
1101-
---------------
1102-
1103-
- type: object
1104-
- description: Parameters for estimation of logistic clade growth based on logit-transformed clade frequencies.
1105-
- Valid attributes:
1106-
1107-
.. contents::
1108-
:local:
1109-
1110-
delta_pivots
1111-
~~~~~~~~~~~~
1112-
1113-
- type: integer
1114-
- description: Calculate logistic growth over the last N pivots which corresponds to N times the amount of time represented by the ``pivot_interval_units`` in the frequencies configuration.
1115-
- default: ``6``
1116-
1117-
min_tips
1118-
~~~~~~~~
1119-
1120-
- type: integer
1121-
- description: The minimum number of tips a clade must have before its logistic growth is calculated.
1122-
- default: ``50``
1123-
1124-
min_frequency
1125-
~~~~~~~~~~~~~
1126-
1127-
- type: float
1128-
- description: The minimum current frequency for a clade to have its logistic growth calculated.
1129-
- default: ``0.000001``
1130-
1131-
max_frequency
1132-
~~~~~~~~~~~~~
1133-
1134-
- type: float
1135-
- description: The maximum current frequency for a clade to have its logistic growth calculated.
1136-
- default: ``0.95``
1137-
1138-
1139-
11401100
ancestral
11411101
---------
11421102

nextstrain_profiles/nextstrain-ci/builds.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,3 @@ subsampling:
3838
frequencies:
3939
min_date: 2020-01-01
4040
max_date: 2020-05-10
41-
42-
# Set CI-specific growth settings, such that the small tree still gets logistic
43-
# growth values and we properly test the growth calculations script.
44-
logistic_growth:
45-
min_tips: 0
46-
max_frequency: 1.0

workflow/snakemake_rules/export_for_nextstrain.smk

-10
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,6 @@ rule auspice_config:
177177
"title": "ACE2 binding vs BA.2",
178178
"type": "continuous"
179179
},
180-
{
181-
"key": "logistic_growth",
182-
"title": "Logistic Growth",
183-
"type": "continuous"
184-
},
185-
{
186-
"key": "current_frequency",
187-
"title": "Current Frequency",
188-
"type": "continuous"
189-
},
190180
{
191181
"key": "mlr_lineage_fitness",
192182
"title": "MLR lineage fitness",

workflow/snakemake_rules/main_workflow.smk

+40-36
Original file line numberDiff line numberDiff line change
@@ -1103,41 +1103,46 @@ rule tip_frequencies:
11031103
--proportion-wide {params.proportion_wide} \
11041104
--output {output.tip_frequencies_json} 2>&1 | tee {log}
11051105
"""
1106-
1107-
rulelogistic_growth:
1108-
input:
1109-
tree="results/{build_name}/tree.nwk",
1110-
frequencies="results/{build_name}/tip-frequencies.json",
1111-
output:
1112-
node_data="results/{build_name}/logistic_growth.json"
1113-
benchmark:
1114-
"benchmarks/logistic_growth_{build_name}.txt"
1115-
conda:
1116-
config["conda_environment"]
1117-
log:
1118-
"logs/logistic_growth_{build_name}.txt"
1119-
params:
1120-
method="logistic",
1121-
attribute_name="logistic_growth",
1122-
delta_pivots=config["logistic_growth"]["delta_pivots"],
1123-
min_tips=config["logistic_growth"]["min_tips"],
1124-
min_frequency=config["logistic_growth"]["min_frequency"],
1125-
max_frequency=config["logistic_growth"]["max_frequency"],
1126-
resources:
1127-
mem_mb=256
1128-
shell:
1129-
r"""
1130-
python3 scripts/calculate_delta_frequency.py \
1131-
--tree {input.tree} \
1132-
--frequencies {input.frequencies} \
1133-
--method {params.method} \
1134-
--delta-pivots {params.delta_pivots} \
1135-
--min-tips {params.min_tips} \
1136-
--min-frequency {params.min_frequency} \
1137-
--max-frequency {params.max_frequency} \
1138-
--attribute-name {params.attribute_name} \
1139-
--output {output.node_data} 2>&1 | tee {log}
1140-
"""
1106+
# This analysis is deprecated as of 2025-01-23
1107+
# This uses frequencies of strains in the tree to estimate logistic growth rates
1108+
# However, analyses at nextstrain.org/sars-cov-2/forecasts use all the available
1109+
# sequence data and provide a more sophisticated estimate of growth rate accounting
1110+
# for competition between circulating viruses. This updated results are available
1111+
# in the `mlr_lineage_fitness` analysis
1112+
# rule logistic_growth:
1113+
# input:
1114+
# tree="results/{build_name}/tree.nwk",
1115+
# frequencies="results/{build_name}/tip-frequencies.json",
1116+
# output:
1117+
# node_data="results/{build_name}/logistic_growth.json"
1118+
# benchmark:
1119+
# "benchmarks/logistic_growth_{build_name}.txt"
1120+
# conda:
1121+
# config["conda_environment"]
1122+
# log:
1123+
# "logs/logistic_growth_{build_name}.txt"
1124+
# params:
1125+
# method="logistic",
1126+
# attribute_name = "logistic_growth",
1127+
# delta_pivots=config["logistic_growth"]["delta_pivots"],
1128+
# min_tips=config["logistic_growth"]["min_tips"],
1129+
# min_frequency=config["logistic_growth"]["min_frequency"],
1130+
# max_frequency=config["logistic_growth"]["max_frequency"],
1131+
# resources:
1132+
# mem_mb=256
1133+
# shell:
1134+
# r"""
1135+
# python3 scripts/calculate_delta_frequency.py \
1136+
# --tree {input.tree} \
1137+
# --frequencies {input.frequencies} \
1138+
# --method {params.method} \
1139+
# --delta-pivots {params.delta_pivots} \
1140+
# --min-tips {params.min_tips} \
1141+
# --min-frequency {params.min_frequency} \
1142+
# --max-frequency {params.max_frequency} \
1143+
# --attribute-name {params.attribute_name} \
1144+
# --output {output.node_data} 2>&1 | tee {log}
1145+
# """
11411146

11421147
# This analysis is deprecated as of 2025-01-23
11431148
# This was drawn from results at https://github.com/bkotzen/sars-cov2-modeling
@@ -1278,7 +1283,6 @@ def _get_node_data_by_wildcards(wildcards):
12781283
rules.emerging_lineages.output.clade_data,
12791284
rules.recency.output.node_data,
12801285
rules.traits.output.node_data,
1281-
rules.logistic_growth.output.node_data,
12821286
rules.mlr_lineage_fitness.output.node_data,
12831287
rules.distances.output.node_data,
12841288
rules.calculate_epiweeks.output.node_data,

0 commit comments

Comments
 (0)
close