dot-GetPosDistFromFeaturePos: .GetPosDistFromFeaturePos Function (ModAnnot)

.GetPosDistFromFeaturePosR Documentation

.GetPosDistFromFeaturePos Function (ModAnnot)

Description

Return, in a GRanges object, the distance between "Mod" (or "Base") positions (provided with grangesData) and feature positions provided with grangesAnnotationsPos. "Mod": the base modified. "Base": the base letter of the modified base. Example: for Mod="6mA", Base="A"; for Mod="5mC", Base="C".

Usage

.GetPosDistFromFeaturePos(
  grangesData,
  grangesAnnotationsPos,
  cWhichStrandVsFeaturePos,
  nWindowSizeAroundFeaturePos,
  lAddCorrectedDistFrom5pTo3p
)

Arguments

grangesData

A GRanges object containing the Mod (or Base) positions to be compared with the grangesAnnotationsPos positions.

grangesAnnotationsPos

A GRanges object containing the annotation positions to be compared with the grangesData positions. The Genomic features categories must be in a column named "type".

cWhichStrandVsFeaturePos

A character value describing if distance comparison must be made between "Mod" (or "Base") and the feature positions...

  • "same": ...if these positions are on the same strand only.

  • "opposite":...if these positions are on opposite strands only.

  • "both": ...for all of these positions: same and opposite strands.

nWindowSizeAroundFeaturePos

Size, in base pairs, of the viewing window around the feature positions.

lAddCorrectedDistFrom5pTo3p

If TRUE, the distance will be corrected to reflect 5' to 3' direction and will be stored in a new column (dist_5to3). Defaults to TRUE.


AlexisHardy/DNAModAnnot documentation built on Feb. 27, 2023, 12:03 a.m.