View source: R/matrixplot_hic.R
hic_matrixplot | R Documentation |
Plot a matrix (or two) for a region of interest with annotations
hic_matrixplot(
exp1,
exp2 = NULL,
chrom,
start,
end,
colour_lim = NULL,
chip = list(NULL, NULL, NULL, NULL),
inferno = NULL,
cexTicks = 1,
chip.colour = "black",
chip.yMax = NULL,
type = rep("triangle", 4),
guessType = T,
coplot = "dual",
genes = NULL,
tads = NULL,
tads.type = "lower",
loops = NULL,
loops.type = "lower",
tads.colour = "#1faee3",
loops.radius = NULL,
loops.colour = "#1faee3",
skipAnn = F,
symmAnn = F,
check.genome = T,
smoothNA = F,
fillNAtreshold = 2,
rasterise = FALSE,
addnames = TRUE,
cut.off = NULL,
colour_bar = FALSE,
antoni = F
)
exp1 |
The Hi-C experiment object: produced by construct.experiment(). |
exp2 |
Optional: a Hi-C experiment object. |
chrom |
Chromosome of the region of interest. Alternatively one of the following:
The latter two options automatically provide the |
start , end |
Start and end position of the region of interest. Ignored if
the |
colour_lim , cut.off |
A |
chip |
A list of feature tracks, can be bed structure (i.e. data frames) or a path to bigwig file (i.e. character variable), maximum length of 4. Placement is inner-top, outer-top, outer-left, inner-left. |
inferno |
White/Red/black or White/Red coloscale? |
cexTicks |
Change size of numbers on the axis |
chip.colour |
A vector of four, parallel to [chip], of the to use colour. |
chip.yMax |
A vector of four, parallel to [chip], of the maximum height of the biwigs. If only one value is given, all be set on this value. |
type |
Should a rectangle or a triangle be drawn? Note that for a triangle a 6th strand column should be included |
guessType |
If an element in the chip is a dataframe, infer the type from column 6? If true, column six should hold "+" and "-". If a row has other characters, we view this entry as no-oriention and thus plot a rectangle. |
coplot |
When drawing together two experiments: [dual] is bottom triangle exp2, top triangle exp1; [diff] plots a substraction of exp2-exp1 |
genes |
Structure with gene information, will only be combined with bed structure |
tads |
BED-like dataframe or a list of these data.frames |
tads.type |
How to show TADS: upper, lower and or both |
loops |
BED-like dataframe or a list of these data.frames |
loops.type |
How to show loops: upper, lower and or both |
tads.colour |
Which colour do you want the TADs to have? |
loops.radius |
Set the size of the loop-circle to X bp. Can help visibility. |
loops.colour |
Which colour do you want the loops to have? |
skipAnn |
Do not plot outside-annotation. Can be used to plot other things next to the matrix. |
symmAnn |
Put features 1&2 also on verical (ignore chip-entries 3&4) |
check.genome |
Check if reference genomes in exp1 and exp2 are the same |
smoothNA |
Set to TRUE to perform a Nadaraya/Watson normalization. This will try to eliminate white stripes: this is only cosmetic and has no effect on the compartment-scores. |
fillNAtreshold |
Set the amount strength of outlier correction for fillNA. |
rasterise |
Set to true to use a bitmap raster instead of polygons. |
addnames |
When the |
colour_bar |
A |
antoni |
Logical: plot an explorer of the microscopic world |
A matrix-plot
A resolution in the ballpark of
(end - start) / 500
.
To plot genes, a gene-model data.frame must be made. This can be done via a multitude of ways (e.g. biomart, UCSC table browser). The resulting data.frame must have one exon per row with the following columns: geneID | transcriptID | chrom | txStart | txEnd | exonStart | exonEnd | strand. Alternatively, if you download the knowngene table from UCSC, you can directly use this table (with exons combined per row), by renaming exonStarts and exonEnds to exonStart and exonEnd.
Robin H. van der Weide, r.vd.weide@nki.nl
Elzo de Wit, e.d.wit@nki.nl
Other matrix plots:
compartment_matrixplot()
,
insulation_matrixplot()
,
pyramid()
,
trans_matrixplot()
## Not run:
# plot two matrices of Hap-1 cells, including their respective loop-calls
hic.matrixplot(
exp1 = Hap1_Haarhuis2017_10kb,
exp2 = Hap1_Sanborn2015_10kb,
chrom = "chr7",
start = 25e6,
end = 30e6,
loops = list(Haarhuis2017_Loops, sanborn2015_Loops),
loops.colour = c("blue", "green"),
loops.type = c("upper", "lower"),
loops.resize = c(20e3, 20e3), # expand for visibility
colour_lim = c(0, 25)
) # upper limit of contacts
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.