Skip to content

Commit

Permalink
Add test data and tests for titer models
Browse files Browse the repository at this point in the history
Adds test data based on public titer data and sequences from the
measurements panel paper [1] and adds functional tests for basic titer
model commands and the new commands with attribute prefixes.

[1] https://github.com/blab/measurements-panel/tree/main/data
  • Loading branch information
huddlej committed Dec 19, 2022
1 parent 1fad6ee commit 9ba5c08
Show file tree
Hide file tree
Showing 7 changed files with 1,188 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"

Test titer substitution model with alignment and tree inputs and a custom prefix for the node data attributes in the output.

$ ${AUGUR} titers sub \
> --tree ../data/tree.nwk \
> --titers ../data/titers.tsv \
> --alignment ../data/aa_seq_HA1.fasta \
> --gene-names HA1 \
> --attribute-prefix custom_prefix_ \
> --output $TMP/titers-sub.json > /dev/null
Read titers from ../data/titers.tsv, found:
--- 61 strains
--- 15 data sources
--- 232 total measurements
$ grep custom_prefix_cTiterSub $TMP/titers-sub.json | wc -l
\s*120 (re)
19 changes: 19 additions & 0 deletions tests/functional/titers/cram/titers-sub-with-tree.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"

Test titer substitution model with alignment and tree inputs.

$ ${AUGUR} titers sub \
> --tree ../data/tree.nwk \
> --titers ../data/titers.tsv \
> --alignment ../data/aa_seq_HA1.fasta \
> --gene-names HA1 \
> --output $TMP/titers-sub.json > /dev/null
Read titers from ../data/titers.tsv, found:
--- 61 strains
--- 15 data sources
--- 232 total measurements
$ grep cTiterSub $TMP/titers-sub.json | wc -l
\s*120 (re)
18 changes: 18 additions & 0 deletions tests/functional/titers/cram/titers-tree-with-custom-prefix.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"

Test titer tree model with a custom prefix for the node data attributes in the output.

$ ${AUGUR} titers tree \
> --tree ../data/tree.nwk \
> --titers ../data/titers.tsv \
> --attribute-prefix custom_prefix_ \
> --output $TMP/titers-tree.json > /dev/null
Read titers from ../data/titers.tsv, found:
--- 61 strains
--- 15 data sources
--- 232 total measurements
$ grep custom_prefix_cTiter $TMP/titers-tree.json | wc -l
\s*120 (re)
17 changes: 17 additions & 0 deletions tests/functional/titers/cram/titers-tree.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Setup

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="${AUGUR:-../../../../bin/augur}"

Test titer tree model.

$ ${AUGUR} titers tree \
> --tree ../data/tree.nwk \
> --titers ../data/titers.tsv \
> --output $TMP/titers-tree.json > /dev/null
Read titers from ../data/titers.tsv, found:
--- 61 strains
--- 15 data sources
--- 232 total measurements
$ grep cTiter $TMP/titers-tree.json | wc -l
\s*120 (re)
Loading

0 comments on commit 9ba5c08

Please sign in to comment.