getStartStopWindows {ORFik} | R Documentation |
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.
getStartStopWindows(txdb, txNames, start = TRUE, stop = TRUE, window_size = 30L, cds = NULL)
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. |
a list with two slots "starts" and "stops", each contains a GRangesList of windows around start and stop codons for the transcripts of interest
gtf_file <- system.file("extdata", "annotations.gtf", package = "ORFik") txdb <- GenomicFeatures::makeTxDbFromGFF(gtf_file, format = "gtf") txNames <- txNamesWithLeaders(txdb) getStartStopWindows(txdb, txNames)