raphael-group / lazac-copy-number

fast and accurate phylogenetic reconstruction from copy number data
6 stars 0 forks source link

ete3-related segfault in root.py #2

Closed mmyers1 closed 2 months ago

mmyers1 commented 2 months ago

When I tried to run the root.py script on my tree of ~200 cells, I saw the following error:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

Not sure if this error is system-related -- this was on a Linux machine with no display set.

I was able to root the tree myself using Biopython.Phylo, which may be less error-prone if other users have the same issue:

from Bio import Phylo
tree = Phylo.read('my_sample_rcnt_tree.newick', 'newick')
tree.root_with_outgroup('root')
Phylo.write(tree, 'rooted_tree.newick', 'newick')
mmyers1 commented 2 months ago

p.s. I would also really appreciate ancestral CN profiles as the other issue mentioned :)

schmidt73 commented 2 months ago

Matt, thanks for reaching out and providing a fix for the script. I think the error was due to DISPLAY not being set, since the package I use, Ete3, also has visualizations capabilities. I updated the script using your fix.

As to the other issue, ancestral CN profiles are now output as a CSV file by the code. The profiles aren't perfect, since they may not satisfy the balancing condition in all cases, but it should be good enough for most purposes. Ideally, I would resolve this by implementing the 2-approximation algorithm stated in the manuscript, but this is a little more work than my bandwidth allows at present. That said, it can definitely be looked into if it is desired.

Let me know if you need any more assistance.

Best, Henri