getStartStopWindows {ORFik}R Documentation

Get Start and Stop codon within specified windows over CDS.

Description

For each cds in 'txdb' object, filtered by 'txNames', get a window around start and stop codons within 'window_size' downstream and upstream of the codon.

Usage

getStartStopWindows(txdb, txNames, start = TRUE, stop = TRUE,
  window_size = 30L, cds = NULL)

Arguments

txdb

a txdb object of annotations

txNames

a character vector of the transcript names to use

start

(logical) whether to include start codons

stop

(logical) whether to incude stop codons

window_size

(integer) size of the window to extract upstream of the start/stop codon and downstream

cds

a GRangesList with cds, a speedup if you already have them loaded.

Value

a list with two slots "starts" and "stops", each contains a GRangesList of windows around start and stop codons for the transcripts of interest

Examples

gtf_file <- system.file("extdata", "annotations.gtf", package = "ORFik")
txdb <- GenomicFeatures::makeTxDbFromGFF(gtf_file, format = "gtf")
txNames <- txNamesWithLeaders(txdb)
getStartStopWindows(txdb, txNames)


[Package ORFik version 1.2.1 Index]