alignData: align genome data at specified coordinates (e.g. TSS)

View source: R/coor2index.R

alignDataR Documentation

align genome data at specified coordinates (e.g. TSS)

Description

align genome data at specified coordinates (e.g. TSS)

Usage

alignData(
  coors,
  data,
  dst = 500,
  chrS,
  coorCols = c(chr = "chr", position = "coor", strand = "strand"),
  reverse = c("-", -1)
)

Arguments

coors

genome positions (chromosome, coordinate, strand) at which data will be aligned (TODO: allow start/end coors and set NA if beyond)

data

genome data to be aligned; NOTE, that currently this is required to be fully expanded matrix covering each chromosome position, i.e. nrow(data)==max(chrS) (TODO: allow non-expanded data)

dst

upstream/downstream length to be aligned

chrS

the chromosome index, indicating the start position of each chromosome in data, derived from chromosome length information, see function getChrSum

coorCols

ordered string vector providing the column names of coordinate columns to be used; must be of length 3 and provide in order: chromosome number (refering to argument chrS), position and strand (see argument reverse)

reverse

a vector of possible reverse strand indicators, all other values in the strand column will be taken as forward strand!


raim/segmenTools documentation built on April 25, 2024, 10:14 a.m.