-
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.
Merge pull request #1398: frequencies: Annotate tips with the minimum…
… necessary information
- Loading branch information
Showing
2 changed files
with
71 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Setup | ||
|
||
$ source "$TESTDIR"/_setup.sh | ||
|
||
Create input files. | ||
|
||
$ cat >metadata.tsv <<~~ | ||
> strain date region | ||
> SEQ1 2021-01-01 A | ||
> SEQ2 2021-01-02 B | ||
> SEQ3 2021-01-01 C | ||
> SEQ4 2021-01-02 C | ||
> SEQ5 2021-02-02 D | ||
> ~~ | ||
$ cat >weights.json <<~~ | ||
> { "A": 2, "B": 1, "C": 1, "D": 0 } | ||
> ~~ | ||
$ cat >tree.nwk <<~~ | ||
> (SEQ2,SEQ3,SEQ4,SEQ5)SEQ1; | ||
> ~~ | ||
Weight by region. | ||
$ ${AUGUR} frequencies \ | ||
> --method kde \ | ||
> --tree tree.nwk \ | ||
> --metadata metadata.tsv \ | ||
> --weights weights.json \ | ||
> --weights-attribute region \ | ||
> --output tip-frequencies.json >/dev/null | ||
$ cat tip-frequencies.json | ||
{ | ||
"SEQ2": { | ||
"frequencies": [ | ||
0.5, | ||
0.5 | ||
] | ||
}, | ||
"SEQ3": { | ||
"frequencies": [ | ||
0.0, | ||
0.0 | ||
] | ||
}, | ||
"SEQ4": { | ||
"frequencies": [ | ||
0.5, | ||
0.5 | ||
] | ||
}, | ||
"SEQ5": { | ||
"frequencies": [ | ||
0.0, | ||
0.0 | ||
] | ||
}, | ||
"generated_by": { | ||
"program": "augur", | ||
"version": ".*" (re) | ||
}, | ||
"pivots": [ | ||
2021.0041, | ||
2021.2507 | ||
] | ||
} (no-eol) |