changePointAnalysis: Get the offset for specific RiboSeq read width

View source: R/shift_footprints_helpers.R

changePointAnalysisR Documentation

Get the offset for specific RiboSeq read width

Description

Creates sliding windows of transcript normalized counts per position and check which window has most in upstream window vs downstream window. Pick the position with highest absolute value maximum of the window difference. Checks windows with split sites between positions -17 to -7, where 0 is TIS. Normally you expect the shift around -12 for Ribo-seq, in TCP-seq / RCP-seq it is usually a bit higher, usually because of cross-linking variations.

Usage

changePointAnalysis(
  x,
  feature = "start",
  max.pos = 40L,
  interval = seq.int(14L, 24L),
  center.pos = 12,
  info = NULL,
  verbose = FALSE
)

Arguments

x

a vector with count per position to analyse, assumes the zero position (TIS) is in the middle + 1 (position 0). Default it is size 60, from -30 to 29 in p-shifting

feature

(character) either "start" or "stop"

max.pos

integer, default 40L, subset x to go from index 1 to max.pos, if tail is not relevant.

interval

integer vector , default seq.int(14L, 24L). The possible shift locations, default Seperation points for upstream and downstream windows. That is (+/- 5 from -12) position.

center.pos

integer, default 12. Centering position for likely p-site. A first qualified guess to save time. 12 means 12 bases before TIS.

info

specify read length if wanted for verbose output.

verbose

logical, default FALSE. Report details of change point analysis.

Details

For visual explanation, see the supl. data of ORFik paper: Transcript normalized means per CDS TIS region, count reads per position, divide that number per position by the total of that transcript, then sum up these numbers per position for all transcripts.

Value

a single numeric offset, -12 would mean p-site is 12 bases upstream

See Also

Other pshifting: detectRibosomeShifts(), shiftFootprints(), shiftFootprintsByExperiment(), shiftPlots(), shifts_load(), shifts_save()


Roleren/ORFik documentation built on Nov. 13, 2024, 10 p.m.