tx_get_flanksFromLogicAnnot: Get data from a position and their neighboring positions

View source: R/tx_core.R

tx_get_flanksFromLogicAnnotR Documentation

Get data from a position and their neighboring positions

Description

Get the data from positions marked with TRUE in a logical variable as the center and the values in its vicinity, delimited by a flank size. Useful to aggregate data surrounding specific sites as motif locations.

Usage

tx_get_flanksFromLogicAnnot(
  DT,
  logi_col,
  values_col,
  upFlank,
  doFlank,
  addRowNames = TRUE
)

Arguments

DT

data.table. A table as output by the tx_makeDT_coverage(), tx_makeDT_nucFreq() or tx_makeDT_covNucFreq() functions.

logi_col

character. Name of column of logical class, which indicates queried sites

values_col

character

upFlank

numeric. Up-stream flank length

doFlank

numeric. Down-stream flank length

addRowNames

logical. Set to TRUE to add rownames in format "gene:txcoor". Default is FALSE.

Value

matrix


AngelCampos/tx_tools documentation built on April 8, 2024, 9:46 p.m.