% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chromosome_matrix.R
\name{chromosome_matrix}
\alias{chromosome_matrix}
\title{Chromosome matrix}
\usage{
chromosome_matrix(
  explist,
  expected = c("bins", "sums", "trans", "cis", "regress"),
  include_chr = "all",
  exclude_chr = c("chrM", "chrY", "M", "Y"),
  sort_chr = TRUE
)
}
\arguments{
\item{explist}{Either a single GENOVA \code{contacts} object or a list of
GENOVA \code{contacts} objects.}

\item{expected}{A \code{character} of length one, one of \code{"bins"},
\code{"sums"}, \code{"trans"} or \code{"cis"}, determining how the expected
component is calculated. See details.}

\item{include_chr}{A \code{character} containing the chromosome names to
include. Setting this to \code{"all"} will refrain form dropping
chromosomes based on inclusion criteria, but will still apply the exclusion
criteria..}

\item{exclude_chr}{A \code{character} containing the chromosome names to
exclude. When a chromosome is both in the \code{include_chr} argument and
in the \code{exclude_chr} argument, exlusion criteria overrule inclusion
criteria.}

\item{sort_chr}{A \code{logical} of length one deciding wether the chromosome
names should by sorted by their name.}
}
\value{
A \code{chrommat_discovery} object with 2 elements:

\itemize{
  \item{\strong{\code{obs}}, a \code{n} x \code{n} x \code{length(explist)} 
  \code{array}, wherein \code{n} is the number of included chromosomes, 
  containing sums of contacts for chromosome combinations}
  \item{\strong{\code{exp}}, an \code{array} of the same dimensions of 
  \code{obs}, but contains the expected values}
  }
}
\description{
Computes sums of chromosome interactions genome-wide along with expected 
values, making it easier to identify enriched trans-contacts that may 
indicate translocations.
}
\details{
The \code{expected} part can be calculated various ways, and is returned as
  proportion of the total. Setting \code{expected = "bins"} (the default)
  will calculate the expected part as the product of a chromosome pair's
  number of bins. Setting \code{expected = "sums"} calculates the expected as
  the chi squared null hypothesis, namely that the proportions are
  conditional on the sums over individual chromosomes. Likewise,
  \code{expected = "trans"} and \code{expected = "cis"} will calculate the
  same as \code{expected = "sum"}, but omit cis- and trans-combinations 
  from the calculation respectively.
}
\section{Resolution recommendation}{
 500kb-1Mb+
}

\examples{
\dontrun{
cm <- chromosome_matrix(list(WT = WT_1Mb, KO = KO_1Mb))
visualise(cm)
}
}
