Get gene models from a remote or local GTF file

getGeneModelsFromGTF(
  source,
  features,
  convertEnsemblUCSC = FALSE,
  destDir = NULL,
  filterProteinCoding = TRUE
)

Arguments

source

a string that is either a path to a local or remote GTF

features

a vector of strings with feature identifiers that to include in the result list

convertEnsemblUCSC

a logical indicating whether Ensembl style chromosome annotation should be changed to UCSC style

destDir

a string that indicates the path to the directory where the downloaded GTF file should be stored

filterProteinCoding

a logical indicating if TSSs should be only protein-coding genes (default = TRUE)

Value

a list of GRanges objects

Examples

CElegansGtfCropped = system.file("extdata", 
                                 "C_elegans_cropped_example.gtf.gz", 
                                 package="GenomicDistributions")
features = c("gene", "exon", "three_prime_utr", "five_prime_utr")
CElegansGeneModels = getGeneModelsFromGTF(CElegansGtfCropped, features, TRUE)
#> Got local file: /private/var/folders/jt/kcfp49s5061b941g5013p8340000gn/T/RtmpRv9Nzf/temp_libpath4df23a7f7406/GenomicDistributions/extdata/C_elegans_cropped_example.gtf.gz
#> Extracting features: gene, exon, three_prime_utr, five_prime_utr