-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export clock rate covariance matrix and std dev
Exports the clock rate covariance matrix and std dev from the phylogenetic regression performed by TreeTime in augur refine. This information was already available in a TreeTime data structure and it is useful to users who do not know the std dev of their pathogen's clock rate already. Adds functional tests for behavior when no clock rate is provided by the user and when one is. In the latter case, we shouldn't have a covariance matrix.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/functional/refine/cram/timetree_with_fixed_clock_rate.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Setup | ||
|
||
$ source "$TESTDIR"/_setup.sh | ||
|
||
Try building a time tree with a fixed clock rate and clock std dev. | ||
|
||
$ ${AUGUR} refine \ | ||
> --tree "$TESTDIR/../data/tree_raw.nwk" \ | ||
> --alignment "$TESTDIR/../data/aligned.fasta" \ | ||
> --metadata "$TESTDIR/../data/metadata.tsv" \ | ||
> --output-tree tree.nwk \ | ||
> --output-node-data branch_lengths.json \ | ||
> --timetree \ | ||
> --coalescent opt \ | ||
> --date-confidence \ | ||
> --date-inference marginal \ | ||
> --clock-rate 0.0012 \ | ||
> --clock-std-dev 0.0002 \ | ||
> --clock-filter-iqd 4 \ | ||
> --seed 314159 &> /dev/null | ||
|
||
Confirm that JSON output does not include information about the clock rate std dev, since it was provided by the user. | ||
|
||
$ grep -A 4 '\"clock\"' branch_lengths.json | ||
"clock": { | ||
"intercept": .*, (re) | ||
"rate": .*, (re) | ||
"rtt_Tmrca": .* (re) | ||
}, |