chromosome_matrix: Chromosome matrix

View source: R/chromosome_matrix.R

chromosome_matrixR Documentation

Chromosome matrix

Description

Computes sums of chromosome interactions genome-wide along with expected values, making it easier to identify enriched trans-contacts that may indicate translocations.

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

explist

Either a single GENOVA contacts object or a list of GENOVA contacts objects.

expected

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

include_chr

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

exclude_chr

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

sort_chr

A logical of length one deciding wether the chromosome names should by sorted by their name.

Details

The expected part can be calculated various ways, and is returned as proportion of the total. Setting expected = "bins" (the default) will calculate the expected part as the product of a chromosome pair's number of bins. Setting expected = "sums" calculates the expected as the chi squared null hypothesis, namely that the proportions are conditional on the sums over individual chromosomes. Likewise, expected = "trans" and expected = "cis" will calculate the same as expected = "sum", but omit cis- and trans-combinations from the calculation respectively.

Value

A chrommat_discovery object with 2 elements:

  • obs, a n x n x length(explist) array, wherein n is the number of included chromosomes, containing sums of contacts for chromosome combinations

  • exp, an array of the same dimensions of obs, but contains the expected values

Resolution recommendation

500kb-1Mb+

Examples

## Not run: 
cm <- chromosome_matrix(list(WT = WT_1Mb, KO = KO_1Mb))
visualise(cm)

## End(Not run)

robinweide/GENOVA documentation built on March 14, 2024, 11:16 p.m.