Skip to content

Commit

Permalink
Update MLR estimates
Browse files Browse the repository at this point in the history
Run via command line script run-mlr-model.py rather than Jupyter notebook
  • Loading branch information
trvrb committed Jun 21, 2023
1 parent 8bc0da6 commit 3ed04d8
Show file tree
Hide file tree
Showing 8 changed files with 727 additions and 38,436 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ metadata.tsv.gz
predictors/nextclade_sars-cov-2_21L.json
predictors/nextclade_sars-cov-2_21L.json.gz

mlr-fitness/estimates/models/
mlr-fitness/estimates/pango_results.json

# Compiled LaTeX output
ncov-escape.pdf

Expand Down
19 changes: 15 additions & 4 deletions mlr-fitness/estimates/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# MLR fitness estimates using evofr

1. Clone [evofr](https://github.com/blab/evofr) repo elsewhere in the file system and install via
1. Install latest version of [evofr](https://github.com/blab/evofr) via pip:
```
poetry build
pip install <path-to-wheel>
pip install evofr
```

2. Run the notebook `evofr_mlr.ipynb` via `jupyter notebook`. This will export a file called `growth_advantages.tsv` that contains the median growth advantage and 80% credible interval per Pango lineage.
2. Run script `run-mlr-model.py` via:
```
python -u run-mlr-model.py --config mlr-config.yaml --export-path . --data-name "pango"
```

This produces the file `pango_results.json`.

3. This file includes unnecessary information of full frequencies trajectories. The script `prune-mlr-results.py` walks through this JSON and extracts just the useful `site` of `ga`:
```
python prune-mlr-results.py --results pango_results.json > growth_advantages.tsv
```

And exports the TSV file called `growth_advantages.tsv` that contains the median growth advantage and 80% credible interval per Pango lineage.
388 changes: 0 additions & 388 deletions mlr-fitness/estimates/evofr_mlr.ipynb

This file was deleted.

Loading

0 comments on commit 3ed04d8

Please sign in to comment.