RFpair_to_pairID: Encode a restriction fragment pair or bin pair into one...

Description Usage Arguments Value Examples

View source: R/binning.R

Description

Using the restriction fragment pairs or bin pairs and their genomic annotation, a unique pair ID is generated.

Usage

1

Arguments

pairs

A dataframe with two columns containing restriction fragment pairs or bin pairs. The mate with the lower ID is always in the left column, and all pairs are sorted in ascending order first by the left column and then by the right colunn.

RFanno

A dataframe giving the genomic annotation of the restriction fragments or bins. Columns are: chromosome, start of restriction fragment or bin, end of restriction fragment or bin, restriction fragment or bin ID. The table is sorted by chromosomal position and restriction fragments or bins are numbered along their genomic position.

Value

A vector containing the pair IDs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# restriction fragment pairs are given here
mypairs <- data.frame(c(1:15), c(16:30))

# genomic annotation of the restriction fragment pairs
chr <- c(rep.int(1,10), rep.int(2,10), rep.int(3,10))
start <- rep.int(seq(1, 30, by = 3), 3)
end <- start + 2
RF_id <- c(1:30)
myanno <- data.frame(chr, start, end, RF_id)

# generate the encoded pairs
code <- RFpair_to_pairID(mypairs, myanno)
# 16  47  78 109 140 171 202 233 264 295 326 357 388 419 450

AnnikaGable/chromium documentation built on July 12, 2018, 4 p.m.