Skip to contents

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