Skip to content

Commit

Permalink
remove augur refine and skip validation
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed May 6, 2024
1 parent c40b821 commit d1c3997
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions tests/functional/export_v2/cram/minify-output.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,33 @@ names to create larger file sizes with less recursion.
> if [ $n -eq 1 ]; then
> echo "$prefix$n"
> else
> echo "($(generate_newick $((n-1))),$prefix$n)"
> echo "($prefix$n,$(generate_newick $((n-1)))):INTERNAL_$n"
> fi
> }

A small tree is not automatically minified.
The unminified output is 15KB which is considered acceptable.
The unminified output is 13KB which is considered acceptable.

$ echo "$(generate_newick 10);" > small_tree_raw.nwk

Use augur refine to add internal node names
$ ${AUGUR} refine --tree small_tree_raw.nwk --output-tree small_tree.nwk &>/dev/null
$ echo "$(generate_newick 10);" > small_tree.nwk


$ ${AUGUR} export v2 \
> --tree small_tree.nwk \
> --skip-validation \
> --output output.json &>/dev/null

$ head -c 20 output.json
{
"version": "v2", (no-eol)

$ ls -l output.json | awk '{print $5}'
15039
13886

It can be forcefully minified with an argument.

$ ${AUGUR} export v2 \
> --tree small_tree.nwk \
> --skip-validation \
> --minify-json \
> --output output.json &>/dev/null

Expand All @@ -50,22 +49,21 @@ even if it may seem "falsey".
$ AUGUR_MINIFY_JSON=0 ${AUGUR} export v2 \
> --tree small_tree.nwk \
> --skip-validation \
> --output output.json &>/dev/null
$ head -c 20 output.json
{"version": "v2", "m (no-eol)
A large tree, when forcefully not minified, has an output size of 8MB which is
A large tree, when forcefully not minified, has an output size of 6MB which is
considered large.
$ echo "$(generate_newick 500);" > big_tree_raw.nwk
Use augur refine to add internal node names
$ ${AUGUR} refine --tree big_tree_raw.nwk --output-tree big_tree.nwk &>/dev/null
$ echo "$(generate_newick 500);" > big_tree.nwk
$ ${AUGUR} export v2 \
> --tree big_tree.nwk \
> --skip-validation \
> --no-minify-json \
> --output output.json &>/dev/null
Expand All @@ -74,7 +72,7 @@ Use augur refine to add internal node names
"version": "v2", (no-eol)
$ ls -l output.json | awk '{print $5}'
8591420
6573338
This means it is automatically minified.
Expand All @@ -87,4 +85,4 @@ This means it is automatically minified.
{"version": "v2", "m (no-eol)
$ ls -l output.json | awk '{print $5}'
576414
566320

0 comments on commit d1c3997

Please sign in to comment.