Hubs for institutions, collaborations, labs, and larger projects
Institutional Xena Hubs allow you to share data, visualizations, and analyses with a specific group of people. Xena Hubs can be set up on any server or in the cloud. You control who has access to the Xena Hub by controlling who has access to the server on which it is hosted.
To make your data publicly available, simply make the server open to the web.

Download

First, download the ucsc_xena_xxx.tar.gz file to your server, here:
The file to download is the one called "Tar archive, no updater or JRE - recommended for linux server developments". Uncompress and extract the .jar file (cavm-xxx-standalone.jar). The current version is 0.25.0.

Start the hub

The hub can be started with "java -jar cavm-xxx-standalone.jar". Passing option --help will display usage information.
Note that you need to use Java 8 to run the hub.
There are several options you will want to set.
To bind an external interface (instead of loopback), use "--host 0.0.0.0".
The connection between your hub and the Xena Browser is through https, use "--certfile" and "--keyfile" options to set them.
There are three paths that can be configured: the database file, the log file, and the root directory for data files to be served. These are set by --database, --logfile, and --root. If you don't set these, they will default to paths under ${HOME}/xena.
1
--database -d default to ${HOME}/xena/database
Copied!
1
--logfile default to ${HOME}/xena/xena.log
Copied!
1
--root -r default to ${HOME}/xena/files/
Copied!

Example start script for an open-access hub

Copy the content below to a file "start_script"
1
#!/bin/bash
2
3
PORT=7222
4
LOGFILE=xena/xena7222.log
5
DOCROOT=xena/files
6
DB=xena/myHub
7
8
java -jar server.jar -r ${DOCROOT} -d ${DB} --no-gui -p ${PORT} -H 0.0.0.0 --logfile ${LOGFILE} --certfile ${CERTFILE} --keyfile ${KEYFILE}> log 2>&1 &
9
10
disown
Copied!
Link server.jar to cavm-x.xx.x-standalone.jar
1
ln -sf cavm-0.xx.0-standalone.jar server.jar
Copied!
Make "start_script" executable
1
chmod u+x start_script
Copied!
Run "./start_script"
1
./start_script
Copied!
Your hub is now running on "https://computer-external-ip:7223".

Getting a security certificate for an open-access hub

When a Xena Hub starts, it opens two consecutive ports, for http and https connections, e.g. 7222 and 7223. HTTP is always the lower number, and HTTPS is always the higher number. This means your hub has two urls
Connecting via HTTP to the hub is no longer supported by modern web browsers, thus you will need to connect via HTTPS. To do this you will need an HTTPS certificate and private key. Paths to the cert and key are set with --certfile and --keyfile. This might seem redundant for a hub behind a firewall, but the web app has no influence over the security policies of the web browser. HTTPS certificates can be acquired from free public Certificate Authorities, or via NIH InCommon.
Note that the section below detailing a way to utilize ssh tunneling to get around this, which can be used for testing purposes only.

Make your data ready

You will need to make your data file ready just like for local Xena hub on your laptop. Please see instructions on data format specifications.
You will also need to make your data's meta-data file (xxx.json) ready. Please see loading data from the command line for instructions.

Load data through command line

Once the hub is running, and input files have been placed in the --root directory, a file can be loaded by running the jar a second time, with the -l option, like
1
ln -sf cavm-x.xx.x-standalone.jar server.jar
Copied!

Delete data through command line

If your hub is run on the default 7222 port, you can load data with
1
java -jar server.jar -l /path/to/root/file.tsv
Copied!
If your hub is running on a different port, you load data with
1
java -jar server.jar -p ${PORT} -l /path/to/root/file.tsv
Copied!
Please contact us at [email protected] for more assistance.
If your hub is run on the default 7222 port, you can delete data with
1
java -jar server.jar -x /path/to/root/file.tsv
Copied!
If your hub is running on a different port, you delete data with
1
java -jar server.jar -p ${PORT} -l /path/to/root/file.tsv
Copied!

Viewing data from the hub

Go to Data Hub page here, add "https:computer-external-ip:7223"
You can now go to the visualization and add a cohort or study listed in your hub.

If you don't have a security certificate yet

If you don't have a security certificate yet but you would like to verify that the hub is working you can use ssh tunneling. An example of how to do this for AWS is below, where it is assumed that the xena hub is running on port 7222 for http and 7223 for https. In this scenario, you start the hub without using --certfile and --keyfile options.
Assuming that you typically ssh into EC2 on AWS like this,
1
ssh -i "xena.pem" [email protected]
Copied!
you will now set up an ssh tunnel to port 8000 on your computer. To do this we add the -L option:
1
ssh -i "xena.pem" -L 8000:localhost:7222 [email protected]
Copied!
Now on your computer, http://localhost:8000 is the same as the http://aws-ip:7222. Chrome Browser does not allow a connection to http://aws-ip:7222, but it will allow a connection to http://localhost:8000.
After setting up the ssh tunnel go to Data Hub page here, add "http://localhost:8000".

How to set up my hub to have a url like https://tcga.xenahubs.net

Alternatively, you can run the hub behind a reverse proxy, and attach the certificate and keyfile to Apache, Nginx or AWS load balancer configurations. In this scenario, you start the hub without using --certfile and --keyfile options. This is useful if you want your hub to have a url like "https://tcga.xenahubs.net". You set up your DNS to point the hostname (tcga.xenahubs.net) to ip address of the server on which the hub is running.
An example apache configuration on AWS VM
in /etc/httpd/conf/httpd.conf
1
<VirtualHost *:443>
2
ServerName tcga.xenahubs.net
3
SSLEngine on
4
SSLProxyEngine On
5
SSLProxyVerify none
6
SSLProxyCheckPeerCN off
7
SSLProxyCheckPeerName off
8
SSLProxyCheckPeerExpire off
9
SSLCertificateFile YOURCERTIFICATE
10
SSLCertificateKeyFile YOURKEY
11
# setup the proxy
12
ProxyPreserveHost On
13
ProxyPass / https://localhost:9000/
14
ProxyPassReverse / https://localhost:9001/
15
</VirtualHost>
Copied!

A landing page for my hub

If you have a markdown file called $DOCROOT/meta/info.mdown in your hub's document root directory, the markdown file will serve as a splash page for your hub. An example is the UCSC Toil RNA-seq Recompute hub: https://toil.xenahubs.net. The corresponding markdown file is this.

How do I add a 'Launch Xena' button like the TOIL landing page

<button class="hubButton" data-cohort="TCGA TARGET GTEx">Launch Xena</button>
To add a clickable button in the hub landing page, make sure the button has classname 'hubButton'. You also need to specify the cohort to view, defined by the data parameter 'data-cohort'. Once users click the button, the visualization wizard will be launched to the specified cohort. You can change the button label.

A landing page for my cohort

You can also have a landing page for a study cohort. An example is the TCGA TARGET GTEx cohort: https://xenabrowser.net/datapages/?cohort=TCGA%20TARGET%20GTEx. The corresponding markdown file is this. The study cohort landing page is also a markdown file, which must be hosted in the https://github.com/ucscXena/cohortMetaData repository on github. The markdown file called https://github.com/ucscXena/cohortMetaData/cohort_$cohortName/info.mdown.

How do I add a "Launch" button like the TCGA TARGET GTEx landing page

<button class="cohortButton" data-bookmark="bc7f3f46b042bcf5c099439c2816ff01">Example: compare FOXM1 expression</button>
The button must has a classname 'cohortButton'. If you have the data parameter 'data-bookmark', clicking the button will take the user to the bookmark view. If you don't have the 'data-bookmark' parameter, clicking the button will take the user to the visualization wizard with an empty spreadsheet. You can change the button label. You can as many button as you want.