I'm trying to use phastSim to simulate mutations onto the newick output from VGsim. Accordingly, I'm using --mutationsTSVinput to pass haplotype information from my VGsim simulations. However, phastSim fails with the following traceback when attempting to apply said mutations:
Traceback (most recent call last):
File "/Users/jmcbr/opt/anaconda3/envs/vgsim/bin/phastSim", line 174, in <module>
genome_tree.mutateBranchETEhierarchy(t, genome_tree.genomeRoot, 1, sim_run.args.createNewick, preMutationsBranches)
File "/Users/jmcbr/opt/anaconda3/envs/vgsim/lib/python3.10/site-packages/phastSim/phastSim.py", line 1538, in mutateBranchETEhierarchy
self.mutateBranchETEhierarchy(c, newGenomeNode, level + 1, createNewick, preMutationsBranches)
File "/Users/jmcbr/opt/anaconda3/envs/vgsim/lib/python3.10/site-packages/phastSim/phastSim.py", line 1538, in mutateBranchETEhierarchy
self.mutateBranchETEhierarchy(c, newGenomeNode, level + 1, createNewick, preMutationsBranches)
File "/Users/jmcbr/opt/anaconda3/envs/vgsim/lib/python3.10/site-packages/phastSim/phastSim.py", line 1538, in mutateBranchETEhierarchy
self.mutateBranchETEhierarchy(c, newGenomeNode, level + 1, createNewick, preMutationsBranches)
[Previous line repeated 7 more times]
File "/Users/jmcbr/opt/anaconda3/envs/vgsim/lib/python3.10/site-packages/phastSim/phastSim.py", line 1481, in mutateBranchETEhierarchy
self.applyMutation(newGenomeNode, level, mutEvent)
File "/Users/jmcbr/opt/anaconda3/envs/vgsim/lib/python3.10/site-packages/phastSim/phastSim.py", line 1397, in applyMutation
node = parentGenomeNode.refNode
AttributeError: 'genomeNode' object has no attribute 'refNode'
It appears to be attempting to access uninitalized attributes- the genomeNode object passed as input to applyMutations in the recursive step (newGenomeNode, in mutateBranchETEhierarchy, line 1472) never has these attributes defined in its __init__ or afterwards. mutationsTSV input requires the hierarchical mode, so I cannot work around this.
I should note that I installed the latest version today simply with
So this is a current issue.
I'm trying to use phastSim to simulate mutations onto the newick output from VGsim. Accordingly, I'm using
--mutationsTSVinputto pass haplotype information from my VGsim simulations. However, phastSim fails with the following traceback when attempting to apply said mutations:It appears to be attempting to access uninitalized attributes- the genomeNode object passed as input to applyMutations in the recursive step (newGenomeNode, in mutateBranchETEhierarchy, line 1472) never has these attributes defined in its __init__ or afterwards. mutationsTSV input requires the hierarchical mode, so I cannot work around this.
I should note that I installed the latest version today simply with
So this is a current issue.