Skip to contents

Outputs an integer vector specifying the distance between the interacting bins, depending on the type of distance specified.

Example:

   rangeA:  |---------|
   rangeB:                |---------|
   mid:           <----------->
   gap:               <-->
   span:    <----------------------->

  • mid: Half the distance between the end of first range and start of second range

  • gap: Distance between the end of first range and start of second range

  • span: Total span from start of first range to end of second range

Usage

# S4 method for class 'linkSet'
pairdist(x, type = "mid")

Arguments

x

A linkSet object

type

The type of distance to calculate, either "mid", "gap", or "span"

Value

A linkSet object with a new metadata column "distance"

Examples

data(linkExample)
linkExample <- pairdist(linkExample, type="mid")