sumtrees.py with weighted trees

60 views
Skip to first unread message

Connor McCoy

unread,
Apr 17, 2013, 1:06:36 PM4/17/13
to dendrop...@googlegroups.com
Hello,

Thank you for the great library.

I'm having trouble using sumtrees.py with weighted trees - whenever I pass the `--weighted-trees` option, the resulting summary tree is always one big unresolved polytomy.  This still occurs if the tree file in question has uniform weights (1.0 for every tree) and a generates a consensus tree with some well supported clades when I run sumtrees.py without `--weighted-trees`.

I've posted a reproducing case here: https://gist.github.com/cmccoy/5405942.

Thanks a lot,
Connor

Jeet Sukumaran

unread,
Apr 18, 2013, 1:57:54 AM4/18/13
to DendroPy Users
Hi Connor,

This is a bug.

I fixed it in the latest revision (9964ca9). Could you please check
and make sure? Thanks.

-- jeet

Connor McCoy

unread,
Apr 23, 2013, 3:25:27 PM4/23/13
to dendrop...@googlegroups.com
Hi Jeet,

Thanks a lot for getting back to me - I tried this out, it seems to be fixed.

Best,
Connor
> --
> You received this message because you are subscribed to a topic in the Google Groups "DendroPy Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/dendropy-users/y8vLA8htCoI/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to dendropy-user...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

William Gearty

unread,
Mar 22, 2014, 3:39:14 PM3/22/14
to dendrop...@googlegroups.com
Hi,
I was having the same problem and was glad to see this bug had been fixed in the github version of DENDROPY.
However, now I am having a different problem.
When using the weighted trees option, the support values are saved out of 1600 (the total number of bootstraps).
Is there a way to change this in the running of the program, or do I just need to go through and divide each support value by 1600 manually?
Thanks,
Will

Jeet Sukumaran

unread,
Mar 24, 2014, 2:47:00 PM3/24/14
to dendrop...@googlegroups.com
Hi William,

I will look into this. Currently, I am working on DendroPy 4, so if the fix will be in a release on that branch.

William Gearty

unread,
Mar 25, 2014, 10:20:36 PM3/25/14
to dendrop...@googlegroups.com
Thanks for the note Jeet.
Looking forward to version 4, I'll just edit the numbers by hand in Adobe Acrobat.

Jeet Sukumaran

unread,
Mar 27, 2014, 3:06:28 AM3/27/14
to dendrop...@googlegroups.com
Hi William,

I have just posted a hotfix for this on the DendroPy3 branch:


If you are able, please try it out and see if it works OK.

I will be publishing a maintenance release of DendroPy3 incorporating this fix later on. But, as I said, all primary development and release is now on the DendroPy4 branch.

William Gearty

unread,
Mar 28, 2014, 4:10:22 PM3/28/14
to dendrop...@googlegroups.com
Hi Jeet,
Thanks for the hotfix.
I will try to use the updated version of the program soon.
I have another problem related to using sumtrees with my PC.
So far I have been using the program with a cluster which has handled multiprocessing no problem with mpi.
However, when I try to run sumtrees in command prompt on my PC, I can not declare the -m option, or I get the following output:
SumTrees: Creating work queue ...
SumTrees: Launching worker processes ...
Process SplitCountingWorker-1:
Traceback (most recent call last):
  File "C:\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap
    self.run()
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 132, in
run
    self.send_info("Received task: '%s'." % source, wrap=False)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 118, in
send_info
    self.send_message(msg, ConsoleMessenger.INFO_MESSAGING_LEVEL, wrap=wrap)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 113, in
send_message
    self.messenger.send(msg, level=level, wrap=wrap)
  File "c:\users\vertpaleo\dendropy\dendropy\utility\messaging.py", line 151, in
 send
    self.primary_out.write(msg)
ValueError: I/O operation on closed file
Process SplitCountingWorker-2:
Traceback (most recent call last):
  File "C:\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap
    self.run()
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 132, in
run
    self.send_info("Received task: '%s'." % source, wrap=False)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 118, in
send_info
    self.send_message(msg, ConsoleMessenger.INFO_MESSAGING_LEVEL, wrap=wrap)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 113, in
send_message
    self.messenger.send(msg, level=level, wrap=wrap)
  File "c:\users\vertpaleo\dendropy\dendropy\utility\messaging.py", line 151, in
 send
    self.primary_out.write(msg)
ValueError: I/O operation on closed file
Process SplitCountingWorker-3:
Traceback (most recent call last):
  File "C:\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap
    self.run()
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 132, in
run
    self.send_info("Received task: '%s'." % source, wrap=False)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 118, in
send_info
    self.send_message(msg, ConsoleMessenger.INFO_MESSAGING_LEVEL, wrap=wrap)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 113, in
send_message
    self.messenger.send(msg, level=level, wrap=wrap)
  File "c:\users\vertpaleo\dendropy\dendropy\utility\messaging.py", line 151, in
 send
    self.primary_out.write(msg)
ValueError: I/O operation on closed file
Process SplitCountingWorker-4:
Traceback (most recent call last):
  File "C:\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap
    self.run()
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 132, in
run
    self.send_info("Received task: '%s'." % source, wrap=False)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 118, in
send_info
    self.send_message(msg, ConsoleMessenger.INFO_MESSAGING_LEVEL, wrap=wrap)
  File "C:\Users\VertPaleo\DendroPy\scripts\sumtrees\sumtrees.py", line 113, in
send_message
    self.messenger.send(msg, level=level, wrap=wrap)
  File "c:\users\vertpaleo\dendropy\dendropy\utility\messaging.py", line 151, in
 send
    self.primary_out.write(msg)
ValueError: I/O operation on closed file

Now, I'm not well versed in python or windows command prompt. Is there some quick and easy way to run sumtrees with multiple processors on my PC?
Thanks,
Will 

Jeet Sukumaran

unread,
Mar 28, 2014, 11:58:30 PM3/28/14
to dendrop...@googlegroups.com
Sorry. I am not familiar with multiprocessor environments for the PC. There was a patch I recently incorporated into SumTrees that enforced closing of files after processing, and race conditions here might lead to the file being closed too early. Unfortunately, as I cannot replicate this issue at the moment, I cannot troubleshoot it. You might try an earlier version of DendroPy, as long as you do not need the most recent fixes (weighted trees). Otherwise, if you really need to run the analysis on your PC, at this point I can only suggest using cygwin. Yes, a little heavy-handed of a solution to just run one program, I know ... 
Reply all
Reply to author
Forward
0 new messages