Skip to content

plot_contacts

Concepts

plot_contacts often rounds out the pipeline as the last tool to be used. The visualizations it offers can be likened to hypothesis tests; they not only depict the adjustments made by preceding tools, but can also illuminate areas that may require further modification. This allows researchers to both fine-tune their approaches and generate publication-ready figures.

Vanilla plot

We’ll start this concept tutorial by looking at the simplest way to use plot_contacts with only 3 required parameters.

Vanilla

As you can see, the plot is a graphical representation of the upper triangle of a contact matrix. Upon successful completion, the plot will automatically be exported to the ~/shared-files folder for downloading.

Click here to learn more about the capabilities of the shared-files folder.

Changing the resolution

res

Perhaps a bit counter-intuitive at first, decreasing the --resolution parameter will provide a finer, more granular plot. This is because the numeric value for --resolution refers to the number of base pairs per bin. Therefore, a bin with only 1000 base pairs will be a more detailed visualization compared to a bin with 5000 base pairs.

Changing color intensity

max_cap

quant_cut

Informing the range with a gene name

gene

Interchromosomal plots

inter_onesample

Inherent normalization

inherent

Two sample analyses

delta

Two-sample interchromosomal plots

inter_twosample

Usage

Usage and Option Summary

Terminal window
plot_contacts -A H3K27ac -R chr1:40280000:40530000 -G hg38

(or):

Terminal window
plot_contacts -A H3K27ac -B H3K27me3 -g MCC7_MYCL -G hg38

Required

Short OptionLong OptionDescription
-A--sample_1Name of sample you want to use to create the contact plot, name it as it appears on the Tinkerbox
-R--rangeThe genomic range that is to be plotted, in chr:start:end format. Example: -R chr1:40280000:40530000. For interchromosomal pairs use chr1:start1:end1-chr2:start2:end2 format. Example: chr2:219000000:225000000-chr13:37500000:43500000
-G--genomeThe genome build the sample(s) has been processed using. Strictly hg19 or hg38

Optional

Short OptionLong OptionDescription
-O--output_nameProvide a name for the output pdf
-Q--normWhich normalization to use. Strictly ‘none’, ‘cpm’ or ‘aqua’ in lower case. Non-spike-in samples default to cpm. Spike-in samples default to aqua.
-B--sample_2For two sample delta plots, name of the second sample.
-r--resolutionResolution of sample in base pairs, using which the contact values should be calculated. Default 5000. Accepted resolutions- 1000,5000,10000,25000,50000,100000,250000,500000,1000000,2500000
-o--color_one_sampleColor for contacts for single sample plots in RGB hexadecimal, ex: red = FF0000 (RRGGBB). Default = FF0000
-t--color_two_sampleColor for contacts for two sample plots (delta) in RGB hexadecimal separated by ’-’, ex: 1E90FF-C71585
--annotations_defaultDraw bed annotations; TSSs, ENCODE 3 enhancers, CpG islands. Default = TRUE
--annotations_customPath to bed file to draw custom annotations. Only one custom bed supported
--quant_cutBetween 0.00-1.00. Rather than using the max value of the matrix as the highest color, cap the values at a given percentile. Default 1.00
--max_capAdjusts the cap value; either increases color intensity by reducing higher values to cap or decreases color intensity if set above maximum
--get_matrixTRUE or FALSE. Obtain raw contact matrices instead of contact plot. Default FALSE
--bedpeSupply path to a bedpe file to highlight tiles of interacting bedpe feet
--bedpe_colorColor for supplied bedpe in RGB hexadecimal. ex: C71585
-i--inherentTRUE or FALSE. If TRUE, normalize the contact plot using inherent normalization
--inh_col_floorContact color for inherent values < 0, in RGB hexadecimal. Default = FFFFFF
--inh_col_offContact color for inherent values ~ 0, in RGB hexadecimal. Default = D4E4FB
--inh_col_onContact color for inherent values ~ 1, in RGB hexadecimal. Default = FF0000
--inh_col_ceilContact color for inherent values > 1, in RGB hexadecimal. Default = FF8D4A
-w--widthManually set width of printed bin between 0 and 1. Default width calculated automatically.
-g--geneProvide a gene name instead of an interval range (-R). Example: —gene sox8. For interchromosomal pairs use gene1,gene2. Example: pax3,foxo1
-f--flankWorks with —gene to increase interval range by flank value in bp. Example: —flank 5000
-h--helpHelp message