Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandage AppImage/AppDir requires the shared libraries libGL.so.1, libfontconfig.so.1, and libfreetype.so.6 #108

Open
sjackman opened this issue Jan 11, 2022 · 5 comments

Comments

@sjackman
Copy link

Bandage requires the shared libraries libGL.so.1, libfontconfig.so.1, and libfreetype.so.6, which are not included in the AppDir. These libraries can be installed using Homebrew on Linux or apt-get.

$ brew install mesa fontconfig freetype
$ sudo apt-get install -y libgl1 libfontconfig1 libfreetype6

$ curl -sLO https://github.com/rrwick/Bandage/releases/download/v0.9.0/Bandage_Ubuntu-x86-64_v0.9.0_AppDir.zip
$ unzip -q Bandage_Ubuntu-x86-64_v0.9.0_AppDir.zip
$ Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage --help
Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
$ ldd Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage | grep 'not found' | sort -u
	libGL.so.1 => not found
$ ls usr/bin/libGL*
ls: cannot access 'usr/bin/libGL*': No such file or directory
$ grep -lr libGL.so.1 Bandage_Ubuntu-x86-64_v0.9.0/usr/lib
Bandage_Ubuntu-x86-64_v0.9.0/usr/lib/libepoxy.so.0
Bandage_Ubuntu-x86-64_v0.9.0/usr/lib/libQt5Gui.so.5
Bandage_Ubuntu-x86-64_v0.9.0/usr/lib/libgdk-3.so.0
Bandage_Ubuntu-x86-64_v0.9.0/usr/lib/libQt5Widgets.so.5
Bandage_Ubuntu-x86-64_v0.9.0/usr/lib/libQt5XcbQpa.so.5
Bandage_Ubuntu-x86-64_v0.9.0/usr/lib/libQt5Svg.so.5
$ ldd Bandage_Ubuntu-x86-64_v0.9.0/usr/plugins/platforms/libqxcb.so | grep 'not found' | sort -u
	libfontconfig.so.1 => not found
	libfreetype.so.6 => not found

Install mesa using Homebrew on Linux.

$ brew install mesa

$ LD_LIBRARY_PATH=Bandage_Ubuntu-x86-64_v0.9.0/usr/lib:$HOME/.linuxbrew/lib ldd Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage | grep libGL
	libGL.so.1 => /home/linuxbrew/.linuxbrew/lib/libGL.so.1 (0x00007f184f856000)
$ LD_LIBRARY_PATH=Bandage_Ubuntu-x86-64_v0.9.0/usr/lib:$HOME/.linuxbrew/lib Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage --help
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: minimal, xcb.

Aborted

Install libgl1 using apt-get.

$ sudo apt-get install -y libgl1
…
$ ldd Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage | grep libGL
	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f64a0cb7000)
	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f649e679000)
	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f649e645000)
$ Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage --help
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: minimal, xcb.

Aborted

Install fontconfig and freetype using Homebrew on Linux.

$ brew install fontconfig freetype

$ LD_LIBRARY_PATH=Bandage_Ubuntu-x86-64_v0.9.0/usr/lib:$HOME/.linuxbrew/lib Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage --help | head
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-linuxbrew'

  ____                  _                  
 |  _ \                | |                 
 | |_) | __ _ _ __   __| | __ _  __ _  ___ 
 |  _ < / _` | '_ \ / _` |/ _` |/ _` |/ _ \
 | |_) | (_| | | | | (_| | (_| | (_| |  __/
 |____/ \__,_|_| |_|\__,_|\__,_|\__, |\___|
                                 __/ |     
                                |___/      
Version: 0.9.0

Install fontconfig and freetype using apt-get.

$ sudo apt-get install -y libfontconfig1 libfreetype6

$ Bandage_Ubuntu-x86-64_v0.9.0/usr/bin/bandage --help | head
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-linuxbrew'

  ____                  _                  
 |  _ \                | |                 
 | |_) | __ _ _ __   __| | __ _  __ _  ___ 
 |  _ < / _` | '_ \ / _` |/ _` |/ _` |/ _ \
 | |_) | (_| | | | | (_| | (_| | (_| |  __/
 |____/ \__,_|_| |_|\__,_|\__,_|\__, |\___|
                                 __/ |     
                                |___/      
Version: 0.9.0
@jmw86069
Copy link

I can confirm above, in various forms using conda environment to try to fill holes in library files.

I can get Bandage console text output shown above with just bandage-0.9.0 --help

$ bandage-0.9.0 --help | head

  ____                  _
 |  _ \                | |
 | |_) | __ _ _ __   __| | __ _  __ _  ___
 |  _ < / _` | '_ \ / _` |/ _` |/ _` |/ _ \
 | |_) | (_| | | | | (_| | (_| | (_| |  __/
 |____/ \__,_|_| |_|\__,_|\__,_|\__, |\___|
                                 __/ |
                                |___/
Version: 0.9.0

However, when trying to export PNG with text labels it fails with same error shown above:

$ bandage-0.9.0 image contigs.gfa out.png --scope aroundnodes --nodes 1439390 --distance 3
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.

It does generate PNG output without text.
However, I can't tell that the --blastrainbow option is working. The colors look either like categorical colors, or as if the rainbow only had 12 slices. Also, maybe that's my sequence problem. :)

Would really love a non-Ubuntu linux build when you or someone can build one. :) Thanks much in advance.
I tried to install dependencies, but it's too big a stretch in our environment. For me anyway.

@sjackman
Copy link
Author

@jmw86069 brew install brewsci/bio/bandage on Linux will install Bandage version 0.8.1, but I imagine you're looking for version 0.9.0.

@jmw86069
Copy link

@sjackman Thanks for commenting! Yes I'm hoping for 0.9.0.

It looks like another fork has active development: asl/Bandage, including some new things they're scoping out. That said, they migrated to Qt6, and that looks like an even trickier build environment to set up, at least on systems convenient to me.

Alas, blastrainbow was not the answer for me, not surprisingly. Different issue altogether.

Ultimately a reasonable workaround for me was to subset the graph, then use desktop Bandage-0.8.1 to review.

I think I can subset the full fastg/gfa to nodes that have BLAST hits, then add +n depth, then save subset GFA to open in this or another tool. (Tbh, I had to look up BLAST syntax again haha. It's been a while.)

I've seen a list of different GFA/GFA2 viewers and tools, but is there another option you use to subset and review an assembly graph? Main thing I wanted from Bandage was to BLAST as a proxy to label specific regions, but I can supply regions in other ways.

@sjackman
Copy link
Author

https://github.com/sjackman/picea-sitchensis-mitochondrion/blob/67d8515eb95d507c15421137b59445a94e3456bd/Makefile#L521-L561

The various modes of the Bandage reduce command line interface is super useful.

@asl
Copy link

asl commented May 13, 2022

@jmw86069 @sjackman We are going to provide appimage for https://github.com/asl/Bandage binaries Note, however, Qt6 requires at least Ubuntu 20.04 LTS, so older systems might be tricky to support. Also, unfortunately it is not possible to include OpenGL libs into appimage as they are quite system-dependent :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants