ContactMatrix distances {InteractionSet} | R Documentation

## Compute linear distances from ContactMatrix objects

### Description

Methods to compute linear distances between pairs of interacting regions in a ContactMatrix object.

### Usage

    ## S4 method for signature 'ContactMatrix'
    pairdist(x, type="mid")

    ## S4 method for signature 'ContactMatrix'
    intrachr(x)

### Arguments

`x` | A ContactMatrix object.
`type` | A character string specifying the type of distance to compute. See `?pairdist,InteractionSet-method` for possible values.

### Details

`pairdist,ContactMatrix-method` will return a matrix of integer (or, if `type="intra"`, logical) values. Each entry of this matrix specifies the distance between the interacting loci that are represented by the corresponding row and column. If `type="intra"`, each entry indicates whether the corresponding interaction is intra-chromosomal. Running `intrachr(x)` is equivalent to `pairdist(x, type="intra")` for any ContactMatrix object `x`. See `pairdist,InteractionSet-method` for more details on the type of distances that can be computed.

### Value

An integer or logical matrix of the same dimensions as `x`, containing the specified distances.

### Author(s)

Aaron Lun

### See Also

`ContactMatrix-class`, `pairdist,InteractionSet-method`

### Examples

    example(ContactMatrix, echo=FALSE)

    pairdist(x)
    pairdist(x, type="gap")
    pairdist(x, type="span")
    pairdist(x, type="diag")

    intrachr(x)

[Package InteractionSet version 1.8.0 Index]