The HiGlass server accepts a number of options to customize its use. Most of these options are set using environment variables before the server is started:

export OPTION=value; python runserver

BASE_DIR - Set the Django base directory. This is where Django will look for the database and the media directories.

REDIS_HOST - The host name for the redis server to use for tile caching. If it’s not specified, then no in-memory tile caching will be performed.

REDIS_PORT - The port for redis server to use for tile caching. If it’s not set and a host is provided, the default port will be used.


Running the server locally:

python runserver 8000


There are test in tilesets/ which can be run from the command line:

python test tilesets

More specific tests can be run by specifying the class and function that contain the test:

python test tilesets.tests.CoolerTest.test_get_multi_tiles

Chromosome sizes

Chromosome sizes specify the lengths of the chromosomes that make up an assembly. While they have no intrinsic biological order, HiGlass displays all chromosomes together on a line so the order of the entries in the file does have a meaning.

They must be imported with the chromsizes-tsv filetype and chromsizes datatype to be properly recognized by the server and the API.

docker exec higlass-container python \
        higlass-server/ ingest_tileset \
        --filename /tmp/chromsizes_hg19.tsv \
        --filetype chromsizes-tsv \
        --datatype chromsizes

Or using curl:

curl -u `cat ~/.higlass-server-login` \
    -F "datafile=@/Users/peter/projects/negspy/negspy/data/mm10/chromInfo.txt" \
    -F "filetype=chromsizes-tsv" \
    -F "datatype=chromsizes" \
    -F "coordSystem=mm10" \
    -F "name=Chromosomes (mm10)" \

This should return a JSON object contain a UUID to confirm that the data has been added to the server:

   "name":"Chromosomes (mm10)",


Retrieving a list of available tilesets:

curl localhost:8000/api/v1/tilesets

To filter by a specific filetype, use the t=filetype parameter:

curl localhost:8000/api/v1/tilesets?t=cooler

To fileter by datatype, use the dt=datatype parameter:

curl localhost:8000/api/v1/tilesets?dt=matrix


python test tilesets --failfast

Or to test a more specific code block:

python test tilesets.tests.CoolerTest.test_transforms --failfast