% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/matrixplot_hic.R
\name{hic_matrixplot}
\alias{hic_matrixplot}
\title{hic.matrixplot}
\usage{
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
)
}
\arguments{
\item{exp1}{The Hi-C experiment object: produced by construct.experiment().}

\item{exp2}{Optional: a Hi-C experiment object.}

\item{chrom}{Chromosome of the region of interest. Alternatively one of the 
following: \itemize{
  \item{A 3-column, 1-row \code{data.frame} in BED-format.}
  \item{A single \code{character} describing a locus in UCSC notation,
     e.g. \code{"chr1:30,000,000-35,000,000"}}
}
The latter two options automatically provide the \code{start} and 
\code{end} arguments too.}

\item{start, end}{Start and end position of the region of interest. Ignored if
the \code{chrom} argument is a BED-format data.frame.}

\item{colour_lim, cut.off}{A \code{numeric} of length 2 for the lower and 
upper colour limits of the hic-matrix plot. \code{cut.off}: older syntax.}

\item{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.}

\item{inferno}{White/Red/black or White/Red coloscale?}

\item{cexTicks}{Change size of numbers on the axis}

\item{chip.colour}{A vector of four, parallel to [chip], of the to use colour.}

\item{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.}

\item{type}{Should a rectangle or a triangle be drawn?
Note that for a triangle a 6th strand column should be included}

\item{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.}

\item{coplot}{When drawing together two experiments: [dual] is bottom
triangle exp2, top triangle exp1; [diff] plots a substraction of exp2-exp1}

\item{genes}{Structure with gene information,
will only be combined with bed structure}

\item{tads}{BED-like dataframe or a list of these data.frames}

\item{tads.type}{How to show TADS: upper, lower and or both}

\item{loops}{BED-like dataframe or a list of these data.frames}

\item{loops.type}{How to show loops: upper, lower and or both}

\item{tads.colour}{Which colour do you want the TADs to have?}

\item{loops.radius}{Set the size of the loop-circle to X bp. Can help 
visibility.}

\item{loops.colour}{Which colour do you want the loops to have?}

\item{skipAnn}{Do not plot outside-annotation. Can be used to plot other
things next to the matrix.}

\item{symmAnn}{Put features 1&2 also on verical (ignore chip-entries 3&4)}

\item{check.genome}{Check if reference genomes in exp1 and exp2 are the same}

\item{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.}

\item{fillNAtreshold}{Set the amount strength of outlier correction for 
fillNA.}

\item{rasterise}{Set to true to use a bitmap raster instead of polygons.}

\item{addnames}{When the \code{coplot} argument is \code{"dual"}, display
names of the samples? (default: \code{TRUE})}

\item{colour_bar}{A \code{logical} of length 1, indicating whether a
colour-bar legend should be drawn at the right.}

\item{antoni}{Logical: plot an explorer of the microscopic world}
}
\value{
A matrix-plot
}
\description{
Plot a matrix (or two) for a region of interest with annotations
}
\note{
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.
}
\section{Resolution recommendation}{
 A resolution in the ballpark of 
  \code{(end - start) / 500}.
}

\examples{
\dontrun{
# 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
}
}
\seealso{
Other matrix plots: 
\code{\link{compartment_matrixplot}()},
\code{\link{insulation_matrixplot}()},
\code{\link{pyramid}()},
\code{\link{trans_matrixplot}()}
}
\author{
Robin H. van der Weide, \email{r.vd.weide@nki.nl}

Elzo de Wit, \email{e.d.wit@nki.nl}
}
\concept{matrix plots}
