The WashU Epigenome Browser supports visualizing the Juicebox Hi-C format now, this tutorial tells you how to display the Juicebox Hi-C track on WashU Epigenome Browser.
- Since version V43:_improved_rendering_of_HiC_tracks_and_yeast_genome_added, we switched to use juicebox.js library to handle Hi-C tracks, so the following Jave dependency is not needed anymore. But the server which is serving .hic file need to enable Cross-origin resource sharing (CORS) .
- when you submit a .hic URL as custom track, if you see `Error: Error accessing resource` error, most likely your webserver is not allowing CORS access, for Apache server please check https://poanchen.github.io/blog/2016/11/20/how-to-enable-cross-origin-resource-sharing-on-an-apache-server and https://enable-cors.org/server_apache.html
Install Java 8
- if you are running Ubuntu, you can follow instructions on this page: http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/
$ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer
- verify you get the Java 8 installed:
$ java -version java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Use Juicebox to prepare the track file
First you need get Juicebox tool (https://github.com/theaidenlab/juicebox), build the command lines tools following the instructions at https://github.com/theaidenlab/juicebox#compiling-jars-from-source-files
Once you have the Juicebox command line tool ready, you could use the pre command to generate the HiC file. (following are adopted from Juicebox website)
The “pre” command takes three required arguments and a number of optional arguments. The optional arguments should go before the required ones. The required arguments are:
- <infile>: Text file with paired contacts. The text file may be gzipped, and should be in the following 11 column format:
- <readname> <str1> <chr1> <pos1> <frag1> <str2> <chr2> <pos2> <frag2> <mapq1> <mapq2> str = strand (0 for forward, anything else for reverse)
- chr = chromosome (must be a chromosome in the genome)
- pos = position
- frag = restriction site fragment
- mapq = mapping quality score
If not using the restriction site file option, frag will be ignored. If not using mapping quality filter, mapq will be ignored.
- <outfile>: Name of outfile, should end with .hic. This is the file you will load into Juicebox.
- <genomeID>: Must be one of hg19, hg38, mm9, mm10, dMel, canFam3, Pf3D7, TAIR10, b37, hg18, macMul1, oryCun2, sCerS288c, or sacCer3. Alternatively, it should be the chrom.sizes file from UCSC, limited to the chromosomes you'd like to visualize.
The optional arguments are:
- -d Only calculate intra chromosome (diagonal) [false]
- -f <restriction site file> Calculate fragment map. Requires restriction site file; each line should start with the chromosome name followed by the position of each restriction site on that chromosome, in numeric order, and ending with the size of the chromosome
- -m <int> Only write cells with count above threshold m 
- -q <int> Filter by MAPQ score greater than or equal to q [not set]
- -c <chromosome ID> Only calculate map on specific chromosome
juicebox pre data/test.txt.gz data/test.hic hg19
This will produce a file in data/test.hic that can be loaded into Juicebox. It will not include a fragment map and will not filter any of the reads.
juicebox pre -q 10 data/test.txt.gz data/test.hic hg19
This will produce a file in data/test.hic that can be loaded into Juicebox. Reads with one or more end with MAPQ < 10 will not be included. It will not include a fragment map.
juicebox pre -q 30 -f data/hg19_MboI.txt data/test.txt.gz data/test.hic hg19
This will produce a file in data/test.hic that can be loaded into Juicebox. Reads with one or more end with MAPQ < 30 will not be included. The restriction site file data/hg19_MboI.txt should list all of the restriction sites on the hg19 genome, where each line should start with the chromosome name followed by the position of each restriction site on that chromosome, in numeric order, and ending with the size of the chromosome. When loaded into Juicebox, users will be able to see the map at fragment resolution.
From the Tracks menu, choose Custom Tracks
Choose add tracks
Choose the Hi-C button
Submit your Hi-C track URL and name etc.
By default, the track is displayed in Arc mode
Right click on the track, choose Heatmap display for example
The track now displayed as Heatmap