Taxa substitution failed due to unknown error

Bug #1703354 reported by Fabian Kellner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Supertree Toolkit
Fix Committed
High
Jon Hill

Bug Description

When trying to substitute taxa this error is displayed:

Failed to substitute taxa due to an unknown error. Possibly a bug. Please report on Launchpad.
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\supertree_toolkit-2.0-py2.7.egg\stk_gui\interface.py", line 2297, in on_sub_taxa_sub_taxa_button
  File "C:\Python27\lib\site-packages\supertree_toolkit-2.0-py2.7.egg\stk\supertree_toolkit.py", line 1678, in substitute_taxa
  File "C:\Python27\lib\site-packages\supertree_toolkit-2.0-py2.7.egg\stk\supertree_toolkit.py", line 3265, in _swap_tree_in_XML
ValueError: invalid literal for int() with base 10: 'NO'

Revision history for this message
Jon Hill (jon-hill) wrote :

Thanks for the report. I'll take a look. Can you attach the Phyml and the substitutions file (or the substitution you were trying to do) here so I can try and replicate this?

Thanks,

Jon

Revision history for this message
Fabian Kellner (fabianlk) wrote :

Thanks for the quick reply! Files are attached.
- Fabian

Revision history for this message
Fabian Kellner (fabianlk) wrote :
Revision history for this message
Jon Hill (jon-hill) wrote :

Super. Thanks. I'll try and get this looked at this week.
J.

Jon Hill (jon-hill)
Changed in supertree-toolkit:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Jon Hill (jon-hill)
Revision history for this message
Jon Hill (jon-hill) wrote :

Bug is caused by assuming tree names are in the form sourceName_n where n is an integer. This is a long-standing bug. Fix is to replace this code with more generic searches in _swap_tree_in_xml

Revision history for this message
Jon Hill (jon-hill) wrote :

Fix committed in: https://github.com/supertree-toolkit/stk/tree/fix_lp1703354

Tried the substitution on the submitter's data and it worked ok producing fewer taxa, but some are now permutable trees (contain %1, etc).

Jon Hill (jon-hill)
Changed in supertree-toolkit:
status: Confirmed → Fix Committed
information type: Public → Private
information type: Private → Public
Revision history for this message
Fabian Kellner (fabianlk) wrote :

Thanks for the quick help John! The github link is not working (for me) though...

- Fabian

Revision history for this message
Jon Hill (jon-hill) wrote :

Sorry - I merged it into master and deleted the branch: https://github.com/supertree-toolkit/stk

I'll try and create a new .deb file (and Windows/Mac releases) soon.

Revision history for this message
Fabian Kellner (fabianlk) wrote :

Thank you very much :)

Revision history for this message
Ruyue (moon1996) wrote :

Failed to substitute taxa due to an unknown error. Possibly a bug. Please report on Launchpad.
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\supertree_toolkit-2.0-py2.7.egg\stk_gui\interface.py", line 2297, in on_sub_taxa_sub_taxa_button
  File "C:\Python27\lib\site-packages\supertree_toolkit-2.0-py2.7.egg\stk\supertree_toolkit.py", line 1678, in substitute_taxa
  File "C:\Python27\lib\site-packages\supertree_toolkit-2.0-py2.7.egg\stk\supertree_toolkit.py", line 3265, in _swap_tree_in_XML
ValueError: invalid literal for int() with base 10: 'ASTRAL'

Revision history for this message
Jon Hill (jon-hill) wrote :

Hi @moon1996. As above, this bug is caused by assuming tree names in the PHYML. Your tree name should be Author_1, Author_2, etc. If you Author has "_" in it, then swapping that for a "-" or similar should fix this.

Alternatively, grab the latest STK from git hub (link above), which should be fixed.

A python3 version of STK is in the works too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.