CSCAn: Cross spatial chromatin analysis

View source: R/ARMLA.R

CSCAnR Documentation

Cross spatial chromatin analysis

Description

Takes a list of BED-like genomic locations and makes a Hi-C contact analysis for crosswise pairs between elements of that list.

Usage

CSCAn(
  explist,
  bedlist,
  shift = 1000000L,
  dist_thres = c(NA, 1e+06),
  size_bin = NULL,
  size_bp = NULL,
  outlier_filter = c(0, 1),
  min_compare = 10,
  anchors = NULL,
  raw = TRUE,
  group_direction = FALSE
)

Arguments

explist

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

bedlist

A named list of length >= 2 wherein each element is a BED-like data.frame with the following three columns:

  1. A character giving the chromosome names.

  2. An integer with start positions.

  3. An integer with end positions.

shift

An integer of length 1 indicating how many basepairs the anchors should be shifted. Essentially performs circular permutation of size for a reasonable estimate of background. The argument is ignored when shift <= 0.

dist_thres

An integer vector of length 2 indicating the minimum and maximum distances in basepairs between anchorpoints.

size_bin, size_bp

The size of the lookup regions in bins (i.e. a score of 21 yields an output with 10 Hi-C bins both up- and downstream of the anchor). When NULL (default), it is internally set to 21 when the size_bp is also NULL. size_bp is an alternative parametrisation for the lookup regions, expressed in basepairs. size_bp is not used when the argument size_bin is set.

outlier_filter

A numeric of length 2 between [0-1] indicating quantiles of data to be used as thresholds. Data outside these thresholds are set to the nearest threshold. Setting this to c(0, 1) performs no outlier correction.

min_compare

An integer of length 1 indicating the minimum number of pairwise interactions on a chromosome to consider.

anchors

(Optional) A matrix with two columns containing pre-computed anchor indices. If this is set, skips calculation of anchor indices and uses this argument instead. See anchors_CSCAn().

raw

A logical of length 1: should the raw array underlying the summary matrices be returned in the output? Should be TRUE if the intention is to use the quantify function.

group_direction

A logical of length 1 which when TRUE will mirror groups for anchors, where the left anchor location is larger than the right anchor location. Left and right refer to the bedlist elements that generate combinations.

Value

An CSCAn_discovery object containing the following slots, wherein i is the number of combinations between the bedlist argument elements:

obsexp

An array with the dimensions size_bin x size_bin x i x length(explist) containing fold change values for the signal over the median shifted values.

signal

An array with the dimensions size_bin x size_bin x i x length(explist) containing mean contact values for bins surrounding the anchors.

signal_raw

A list with length(explist) elements for each contacts object, wherein an element is an n x size_bin x size_bin array with contact values for each anchor. 'n' is the number of non-empty valid anchors.

shifted

An array with the dimensions size_bin x size_bin x i x length(explist) containing mean contact values for bins that are shift basepairs away from the anchors.

shifted_raw

A list with length(explist) elements for each contacts object, wherein an alemeent is an n x size_bin x size_bin array with contact values for each shifted anchors. 'n' is the number of non-empty valid (unshifted) anchors.

See Also

The rep_mat_lookup function that performs the lookup and summary for the CSCan function and others.
The discovery class for a general description of discovery classes.
The visualise function for visualisation of the results.
The anchors documentation for more information about anchors.

Other aggregate repeated matrix lookup analyses: APA(), ARA(), ATA(), PESCAn(), rep_mat_lookup()

Examples

## Not run: 
cscan <- CSCAn(list(WT_20kb, KO_20kb),
               bedlist = list(group_A, group_B))
               
visualise(cscan)

## End(Not run)

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