longestORFs {ORFik} | R Documentation

## Get longest ORF per stop site

### Description

Rule: if seqname, strand and stop site is equal, take longest one. Else keep. If IRangesList or IRanges, seqnames are groups, if GRanges or GRangesList seqnames are the seqlevels (e.g. chromosomes/transcripts)

### Usage

    longestORFs(grl)

### Arguments

`grl` | a `GRangesList`/IRangesList, GRanges/IRanges of ORFs

### Value

a `GRangesList`/IRangesList, GRanges/IRanges (same as input)

### See Also

Other ORFHelpers: `defineTrailer()`, `mapToGRanges()`, `orfID()`, `startCodons()`, `startSites()`, `stopCodons()`, `stopSites()`, `txNames()`, `uniqueGroups()`, `uniqueOrder()`

### Examples

    ORF1 = GRanges("1", IRanges(10,21), "+")
    ORF2 = GRanges("1", IRanges(1,21), "+") # <- longest
    grl <- GRangesList(ORF1 = ORF1, ORF2 = ORF2)
    longestORFs(grl) # get only longest

[Package ORFik version 1.6.9 Index]