calculateDistances: Calculate interaction distances

Description Usage Arguments Value Author(s) See Also Examples

Description

This computes the linear distances between anchoring regions for each interaction, simply by calling the pairdist function from GenomicInteractions.

Usage

1
2
3
4
5
calculateDistances(GIObject, method = "midpoint", floor = TRUE)

## S4 method for signature 'GenomicInteractions'
calculateDistances(GIObject,
  method = "midpoint", floor = TRUE)

Arguments

GIObject

A GenomicInteractions object

method

String indicating how to calculate distances. Should be "midpoint", "outer" or "inner".

floor

A logical specifying whether to round down distances to the nearest base pair. Defaults to TRUE.

Value

A numeric vector containing the distances between anchors/GRanges. If floor=TRUE, this vector is integer. Interactions on different chromosomes have distances set to NA.

Author(s)

Malcolm Perry, Elizabeth Ing-Simmons

See Also

pairdist, which this function calls.

Examples

1
2
3
4
5
6
7
anchor.one <- GRanges(c("chr1", "chr1", "chr1", "chr1"), 
    IRanges(c(10, 20, 30, 20), width=5))
anchor.two <- GRanges(c("chr1", "chr1", "chr1", "chr2"), 
    IRanges(c(100, 200, 300, 50), width=5))
test <- GenomicInteractions(anchor.one, anchor.two)
calculateDistances(test, method="midpoint")
        

LTLA/fugi documentation built on June 22, 2019, 8:50 p.m.