Saturation calculation error?
Closed this issue · 3 comments
ymilesz commented
Hi Jacob, thanks for developing PhyKIT, I find it very useful in calculating various summary statistics. However, I'm encountering an error with the saturation function, and I am not sure what the problem is. The error is as follows:
File "/home/zhangy/miniconda3/envs/phykit/bin/phykit", line 10, in <module>
sys.exit(main())
^^^^^^
File "/home/zhangy/miniconda3/envs/phykit/lib/python3.11/site-packages/phykit/phykit.py", line 2375, in main
Phykit()
File "/home/zhangy/miniconda3/envs/phykit/lib/python3.11/site-packages/phykit/phykit.py", line 251, in __init__
self.run_alias(args.command, sys.argv[2:])
File "/home/zhangy/miniconda3/envs/phykit/lib/python3.11/site-packages/phykit/phykit.py", line 340, in run_alias
return self.saturation(argv)
^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangy/miniconda3/envs/phykit/lib/python3.11/site-packages/phykit/phykit.py", line 2192, in saturation
Saturation(args).run()
File "/home/zhangy/miniconda3/envs/phykit/lib/python3.11/site-packages/phykit/services/tree/saturation.py", line 38, in run
patristic_distances, pairwise_identities = self.loop_through_combos_and_calculate_pds_and_pis(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangy/miniconda3/envs/phykit/lib/python3.11/site-packages/phykit/services/tree/saturation.py", line 80, in loop_through_combos_and_calculate_pds_and_pis
pairwise_identities = self.calculate_pairwise_identities(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangy/miniconda3/envs/phykit/lib/python3.11/site-packages/phykit/services/tree/saturation.py", line 104, in calculate_pairwise_identities
if seq_one[idx] == seq_two[idx]:
~~~~~~~^^^^^
IndexError: string index out of range
Thanks!
Miles
JLSteenwyk commented
Hi Miles,
Thanks for using PhyKIT!
Can you please send over the files you used as input and note the version of PhyKIT you used?
best,
Jacob
ymilesz commented
Hi Jacob,
So I think it is actually because I had a taxon name discrepancy between the MSA and the tree, sorry false alarm. Running it now (albeit taking forever due to the large dataset).
Best,
Miles
JLSteenwyk commented
Great - thanks, Miles!