coor2index: convert chromosome coordinates to continuous index

View source: R/coor2index.R

coor2indexR Documentation

convert chromosome coordinates to continuous index

Description

convert chromosome coordinates to continuous index

Usage

coor2index(
  features,
  chrS,
  chrMap,
  cols = c("start", "end", "coor"),
  chrCol = "chr",
  strandCol = "strand",
  reverse = c("-", -1),
  circular = FALSE
)

Arguments

features

a table of chromosome features that must contain the chromosome number (option chrCol), one or more chromosome positions (option cols) and strand information (column strandCol).

chrS

the chromosome index, indicating the start position of each chromosome in the continuous index, derived from chromosome length information; simply the cumulative lengths of ordered chrosomes, see function getChrSum

chrMap

a vector of chromosome names using features' chromosome column, in the same order as chrS

cols

name of the columns giving coordinates that will be mapped to continuous index

chrCol

name of the column that gives the chromosome number

strandCol

name of the column that gives forward/reverse strand information

reverse

a vector of possible reverse strand indicators

circular

suppresses re-sorting to start < end for circular chromosomes


raim/segmenTools documentation built on March 20, 2024, 6:23 a.m.