detectRibosomeShifts {ORFik} | R Documentation

## Detect ribosome shifts

### Description

Utilizes periodicity measurement (fourier transform) and change point analysis to detect ribosomal footprint shifts for each of the ribosomal read lengths. Returns subset of read lengths and their shifts for which top covered transcripts follow periodicity measure. Each shift value assumes 5' anchoring of the reads, so that output offsets values will shift 5' anchored footprints to be on the p-site of the ribosome.

### Usage

    detectRibosomeShifts(footprints, txdb, start = TRUE, stop = FALSE,
      top_tx = 10L, minFiveUTR = 30L, minCDS = 150L, minThreeUTR = 30L,
      firstN = 150L)

### Arguments

`footprints` | (GAlignments) object of RiboSeq reads - footprints
`txdb` | a txdb object from a gtf file
`start` | (logical) Whether to include predictions based on the start codons. Default TRUE.
`stop` | (logical) Whether to include predictions based on the stop codons. Default FASLE.
`top_tx` | (integer) Specify which transcripts to use for estimation of the shifts. By default we take top 10 top covered transcripts as they represent less noisy dataset. This is only applicable when there are more than 1000 transcripts.
`minFiveUTR` | (integer) minimum bp for 5' UTR during filtering for the transcripts
`minCDS` | (integer) minimum bp for CDS during filtering for the transcripts
`minThreeUTR` | (integer) minimum bp for 3' UTR during filtering for the transcripts
`firstN` | (integer) Represents how many bases of the transcripts downstream of start codons to use for initial estimation of the periodicity.

### Details

Check out vignette for the examples of plotting RiboSeq metaplots over start and stop codons, so that you can verify visually whether this function detects correct shifts.

### Value

a data.frame with lengths of footprints and their predicted coresponding offsets

### Examples

    ## Not run:
    gtf_file <- system.file("extdata", "annotations.gtf", package = "ORFik")
    txdb <- GenomicFeatures::makeTxDbFromGFF(gtf_file, format = "gtf")
    riboSeq_file <- system.file("extdata", "ribo-seq.bam", package = "ORFik")
    footprints <- GenomicAlignments::readGAlignments(
      riboSeq_file, param = ScanBamParam(flag = scanBamFlag(
        isDuplicate = FALSE, isSecondaryAlignment = FALSE)))

    detectRibosomeShifts(footprints, txdb, stop = TRUE)

    ## End(Not run)

[Package ORFik version 1.2.1 Index]