diff --git a/tests/functional/ancestral/cram/vcf.t b/tests/functional/ancestral/cram/vcf.t new file mode 100644 index 000000000..6dc555b74 --- /dev/null +++ b/tests/functional/ancestral/cram/vcf.t @@ -0,0 +1,39 @@ +Setup + + $ source "$TESTDIR"/_setup.sh + + $ export DATA="$TESTDIR/../data/simple-genome" + +This ~should~ be the same as the first test in general.t, however +with VCF input instead of a FASTA MSA. +The output will not have the full sequence attached to every node, +but it will have the reference sequence attached. + +BUG: The SNPs at nt 33 are encoded in the VCF as: +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample_A sample_B sample_C +1 33 . A C,G . . . GT 1 2 0 +where ALT 1 ("C") is on Sample_A and ALT 2 ("G") is on Sample_B. +The ALT 2 is not being parsed by Augur (Treetime), which results in +a changed mutation profile at pos 33: +. **FASTA input** **VCF input** +. |---G33C-- sample_A |---A33C-- sample_A +. --A33G-| -------| +. |--------- sample_B |--------- sample_B +. +Because of this bug, the following test fails. + + $ ${AUGUR} ancestral \ + > --tree $DATA/tree.nwk \ + > --alignment $DATA/snps.vcf \ + > --vcf-reference $DATA/reference.fasta \ + > --output-node-data "nt_muts.vcf-input.ref-seq.json" \ + > --output-vcf "nt_muts.vcf-input.ref-seq.vcf" \ + > --inference marginal > /dev/null + + + $ python3 "$TESTDIR/../../../../scripts/diff_jsons.py" \ + > "$DATA/nt_muts.ref-seq.json" \ + > "nt_muts.vcf-input.ref-seq.json" \ + > --exclude-regex-paths "root\['nodes'\]\['.+'\]\['sequence'\]" + {} + diff --git a/tests/functional/ancestral/data/simple-genome/snps.vcf b/tests/functional/ancestral/data/simple-genome/snps.vcf new file mode 100644 index 000000000..cf116b4a9 --- /dev/null +++ b/tests/functional/ancestral/data/simple-genome/snps.vcf @@ -0,0 +1,15 @@ +##fileformat=VCFv4.3 +##contig= +##FORMAT= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample_A sample_B sample_C +1 5 . T C . . . GT 1 1 1 +1 7 . T G . . . GT 1 1 0 +1 14 . C T . . . GT 1 1 0 +1 18 . C T . . . GT 0 0 1 +1 28 . A N . . . GT 0 0 1 +1 29 . A N . . . GT 0 0 1 +1 30 . A N . . . GT 0 0 1 +1 33 . A C,G . . . GT 1 2 0 +1 39 . C T . . . GT 1 0 0 +1 42 . G A . . . GT 0 1 0 +1 43 . A T . . . GT 1 1 0