Skip to content

GW on Android

Alex Kearsey edited this page Mar 23, 2023 · 16 revisions

Installing GW on Android

This is a guide to installing GW on your android phone/tablet. Basically we will be adding a Linux desktop environment (DE) to your device so you can potentially use other bioinformatics tools, not just GW!

Prerequisites

  • Termux - a terminal emulator. Get this from the fdroid repository
  • VNC Viewer - this is the screen sharing tool for your Linux DE

Installation

GW can be installed using the package manager

  • Open the termux app
  • Update the package manager and grab GW
pkg update -y # select default options when prompted
pkg install -y x11-repo
pkg install -y gw aterm tigervnc

The following are recommended to use GW interactively, but not essential:

pkg install -y xfce4 vim

Usage

  • Start the vncserver in termux app. This will enable screen sharing with your VNC Viewer app. You will be asked to set a password!

vncserver -localhost

You should see a message like New 'localhost:1 ()' desktop is localhost:1. This is telling you that the screen is hosted at display :1, so the connection port will (normally) be 5901. - Open VNC Viewer. Add a new connection to 127.0.0.1:5901 and type in password.

You will see an aterm window. It is possible to run GW from here, although we recommend starting xfce for a full linux desktop. Type this into the aterm window:

xfce4-session &

You should now see a Linux desktop environment, with access to a nicer terminal (located on the bar at the bottom of the screen).

To access files outside of termux on the device, run termux-setup-storage in termux and allow file permissions. You can then connect external hard drives, for example.

Testing

To test gw, you can use any bam file with its reference file. A test bam and fa can be downloaded by cloning gw from github.

pkg install git
git clone https://github.com/kcleal/gw.git

These files are found in the gw/test directory, and can be viewed with.

cd gw/test
gw -r chr1 -b test.bam test.fa
or
gw -b test.bam test.fa
then typing :goto chr1 whilst the gw window is selected.

Next steps

Running the vncserver command for the first time and entering a password should create a .vnc directory in home. Within .vnc the xstartup file can be edited by commenting out the aterm -geometry 80x24*10+10 -ls & and twm & lines, then appending xfce4-session4 & to the bottom to avoid having to enter this whenever the vncserver is started.

The vncserver command can also be used with -geometry 1920x1080 to increase the screen size of the vncserver. This can also be avoided having to be added every time by creating an alias in the ~/.bashrc file. If the .bashrc does not exist within the home directory, one can be obtained with cp $PREFIX/etc/bash.bashrc ~/.bashrc. An alias can be created by adding the line alias vncstart="vncserver -geometry 1920x1080" then source ~/.bashrc.

To get a gw config cp $PREFIX/share/doc/gw/gw.ini ~/.gw.ini.

Debugging

  • Check to see what vncservers are already running using vncserver -list. You can kill a server by using vncserver -kill :1, for example.
  • You may have an x11 lock file located in ~/usr/tmp, remove this might help rm -rf ~/usr/tmp/.X*

Useful links to aid with debugging:

https://wiki.termux.com/wiki/Building_packages https://wiki.termux.com/wiki/Termux-setup-storage https://wiki.termux.com/wiki/Graphical_Environment

Clone this wiki locally