stopRegion {ORFik} | R Documentation

## Stop region as GRangesList

### Description

Get the stop region of each ORF / region. If you want the stop codon only, set downstream = 0 or just use `stopCodons`. Standard is 2 upstream and 2 downstream, a width 5 window centered at stop site.

### Usage

    stopRegion(grl, tx = NULL, is.sorted = TRUE, upstream = 2L, downstream = 2L)

### Arguments

`grl` | a `GRangesList` object with usually either leaders, cds', 3' utrs or ORFs
`tx` | default NULL, a GRangesList of transcripts or (container region), names of tx must contain all grl names. The names of grl can also be the ORFik orf names. that is "txName_id"
`is.sorted` | logical (TRUE), is grl sorted.
`upstream` | an integer (2), relative region to get upstream from.
`downstream` | an integer (2), relative region to get downstream from

### Details

If tx is null, then downstream will be forced to 0 and upstream to a minimum of -grl width (to the TSS). . Since there is no reference for splicing.

### Value

a GRanges, or GRangesList object if any group had > 1 exon.

### See Also

Other features: `computeFeaturesCage()`, `computeFeatures()`, `countOverlapsW()`, `disengagementScore()`, `distToCds()`, `distToTSS()`, `entropy()`, `floss()`, `fpkm_calc()`, `fpkm()`, `fractionLength()`, `initiationScore()`, `insideOutsideORF()`, `isInFrame()`, `isOverlapping()`, `kozakSequenceScore()`, `orfScore()`, `rankOrder()`, `ribosomeReleaseScore()`, `ribosomeStallingScore()`, `startRegionCoverage()`, `startRegion()`, `subsetCoverage()`, `translationalEff()`

### Examples

    ## ORF stop region
    orf <- GRangesList(tx1 = GRanges("1", 200:300, "+"))
    tx <- GRangesList(tx1 = GRanges("1",
                       IRanges(c(100, 305), c(300, 400)), "+"))
    stopRegion(orf, tx, upstream = 6, downstream = 6)
    ## 2nd last codon of ORF
    stopRegion(orf, tx, upstream = 6, downstream = -3)

[Package ORFik version 1.12.13 Index]