HiC

From wubrowse wiki
Jump to: navigation, search

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.

Enable CORS

Install Java 8

$ 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 [0]
  • -q <int> Filter by MAPQ score greater than or equal to q [not set]
  • -c <chromosome ID> Only calculate map on specific chromosome

Examples

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.


Track submission

From the Tracks menu, choose Custom Tracks

Hic1.png

Choose add tracks

Hic2.png

Choose the Hi-C button

Hic3.png

Submit your Hi-C track URL and name etc.

Hic4.png

By default, the track is displayed in Arc mode

Hic5.png

Right click on the track, choose Heatmap display for example

Hic6.png

The track now displayed as Heatmap

Hic7.png