You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running an augur ancestral prototype that allows reconstruction of amino acid sequences, I ran into the following error for reconstruction of Zika amino acid sequences for the 2K gene:
It turns out that this error occurs only when attempting to infer ancestral sequences with joint inference and GTR inference. The following Python code provides a minimal unit test to recreate the error.
deftest_seq_joint_reconstruction_of_identical_sequences_with_inferred_gtr():
"""Reconstruct the sequences of the internal nodes with joint inference and inferred GTR using tip sequences that are identical and confirm that the reconstruction is correct. """fromtreetimeimportTreeAncfromBioimportPhylo, AlignIOtiny_tree=Phylo.read(StringIO("((A:0.60100000009,B:0.3010000009):0.1,C:0.2):0.001;"), 'newick')
tiny_aln=AlignIO.read(StringIO(">A\nAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCGGGGGGGGGGGGGGGGTTTTTTTTTTTTTTTT\n"">B\nAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCGGGGGGGGGGGGGGGGTTTTTTTTTTTTTTTT\n"">C\nAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCGGGGGGGGGGGGGGGGTTTTTTTTTTTTTTTT\n"), 'fasta')
myTree=TreeAnc(gtr="JC69", tree=tiny_tree, aln=tiny_aln, verbose=4)
myTree.infer_ancestral_sequences(infer_gtr=True, infer_tips=True, marginal=False)
returnmyTree
The error can be avoiding by either not inferring GTR (infer_gtr=False) or by using marginal inference (marginal=True). The augur ancestral command does not provide a user argument to toggle the GTR inference from the default of True to False. It does provide a toggle to switch to marginal inference, though.
the TreeTime error is indeed from the identical sequences. There is nothing to estimate the GTR model from. I thought this had been regularized by pseudo counts.
That statement made me think this issue might want to be resolved in TreeTime. If TreeTime could check for this issue internally and raise a user-readable error, Augur could pass that error on to the user. Alternately, Augur could be responsible for checking whether the input sequences are identical and inconsistent with inferring GTR state, so users would know. In that case, we'd want to add an augur ancestral argument for users to toggle off GTR inference when this issue occurs.
The text was updated successfully, but these errors were encountered:
When running an
augur ancestral
prototype that allows reconstruction of amino acid sequences, I ran into the following error for reconstruction of Zika amino acid sequences for the 2K gene:It turns out that this error occurs only when attempting to infer ancestral sequences with joint inference and GTR inference. The following Python code provides a minimal unit test to recreate the error.
The error can be avoiding by either not inferring GTR (
infer_gtr=False
) or by using marginal inference (marginal=True
). Theaugur ancestral
command does not provide a user argument to toggle the GTR inference from the default ofTrue
toFalse
. It does provide a toggle to switch to marginal inference, though.@rneher notes in the related issue:
That statement made me think this issue might want to be resolved in TreeTime. If TreeTime could check for this issue internally and raise a user-readable error, Augur could pass that error on to the user. Alternately, Augur could be responsible for checking whether the input sequences are identical and inconsistent with inferring GTR state, so users would know. In that case, we'd want to add an
augur ancestral
argument for users to toggle off GTR inference when this issue occurs.The text was updated successfully, but these errors were encountered: