filterTranscripts {ORFik} | R Documentation

## Get the transcripts with accepted lengths of leaders, cds and trailer.

### Description

Filter transcripts to those who have leaders, CDS, trailers of some lengths, you can also pick the longest per gene.

### Usage

    filterTranscripts(txdb, minFiveUTR = 30L, minCDS = 150L,
      minThreeUTR = 30L, longestPerGene = TRUE, stopOnEmpty = TRUE)

### Arguments

`txdb` | a TxDb file or a path to one of: (.gtf ,.gff, .gff2, .gff2, .db or .sqlite)
`minFiveUTR` | (integer) minimum bp for 5' UTR during filtering for the transcripts. Set to NULL if no 5' UTRs exists for annotation.
`minCDS` | (integer) minimum bp for CDS during filtering for the transcripts
`minThreeUTR` | (integer) minimum bp for 3' UTR during filtering for the transcripts. Set to NULL if no 3' UTRs exists for annotation.
`longestPerGene` | logical (TRUE), return only longest valid transcript per gene.
`stopOnEmpty` | logical TRUE, stop if no valid names are found ?

### Details

If a transcript does not have a trailer, then the length is 0, so they will be filtered out. So only transcripts with leaders, cds and trailers will be returned. You can set the integer to 0, that will return all within that group.

If your annotation does not have leaders or trailers, set them to NULL.

### Value

a character vector of valid tramscript names

### Examples

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

[Package ORFik version 1.4.1 Index]