tx_add_motifPresence: Add motif presence

tx_add_motifPresenceR Documentation

Add motif presence

Description

Add motif presence

Usage

tx_add_motifPresence(
  DT,
  motif,
  nucPositions = "all",
  motifColName = "auto",
  mask_N = TRUE,
  nCores = 1
)

Arguments

DT

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

motif

character. A word which depicts a DNA sequence motif to annotate. The function allows IUPAC ambiguity codes, e.g. R=A|G.

nucPositions

character or numeric.

  • "all": Will mark all the positions of the motif

  • "center": Will mark the center of the motif

  • "i": A number can be passed in which the ith position will be marked. For example, for the 'CAC' motif a value of '2' will mark all 'A's surrounded by a 'C'.

motifColName

character. Name of the new column to be added for annotating motif presence. Automatically is set to be a combination of the input motif and nucPositions arguments.

mask_N

logical. If set to FALSE, 'N' nucleotides are left as is, therefore matching motifs. i.e. A consecutive sequence of NNNNN will match any 5 letter motif as 'DRACH'; generally not desired.

nCores

integer. Number of cores to run the function with. Multicore capability is not available in Windows OS.

Value

data.table


AngelCampos/txtools documentation built on Sept. 16, 2024, 10:25 p.m.