-
Notifications
You must be signed in to change notification settings - Fork 129
/
metadata-with-accession.t
33 lines (26 loc) · 1.88 KB
/
metadata-with-accession.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Setup
$ source "$TESTDIR"/_setup.sh
Run export with metadata that contains "accession".
$ ${AUGUR} export v2 \
> --tree "$TESTDIR/../data/tree.nwk" \
> --metadata "$TESTDIR/../data/dataset1_metadata_with_strain_and_accession.tsv" \
> --node-data "$TESTDIR/../data/div_node-data.json" "$TESTDIR/../data/location_node-data.json" \
> --auspice-config "$TESTDIR/../data/auspice_config1.json" \
> --maintainers "Nextstrain Team" \
> --output dataset.json > /dev/null
$ python3 "$TESTDIR/../../../../scripts/diff_jsons.py" "$TESTDIR/../data/dataset_with_accession.json" dataset.json \
> --exclude-paths "root['meta']['updated']" "root['meta']['maintainers']"
{}
Run export with metadata that contains "accession", and use "accession" as the ID column.
Currently, this results in losing the accession from the node attributes.
$ ${AUGUR} export v2 \
> --tree "$TESTDIR/../data/tree.nwk" \
> --metadata "$TESTDIR/../data/dataset1_metadata_with_strain_and_accession.tsv" \
> --metadata-id-columns accession \
> --node-data "$TESTDIR/../data/div_node-data.json" "$TESTDIR/../data/location_node-data.json" \
> --auspice-config "$TESTDIR/../data/auspice_config1.json" \
> --maintainers "Nextstrain Team" \
> --output dataset.json > /dev/null
$ python3 "$TESTDIR/../../../../scripts/diff_jsons.py" "$TESTDIR/../data/dataset_with_accession.json" dataset.json \
> --exclude-paths "root['meta']['updated']" "root['meta']['maintainers']"
{'dictionary_item_removed': [root['tree']['children'][0]['node_attrs']['accession'], root['tree']['children'][1]['children'][0]['node_attrs']['accession'], root['tree']['children'][1]['children'][1]['node_attrs']['accession'], root['tree']['children'][2]['children'][0]['node_attrs']['accession'], root['tree']['children'][2]['children'][1]['node_attrs']['accession'], root['tree']['children'][2]['children'][2]['node_attrs']['accession']]}