get_gtf | R Documentation |
Downloads a GTF file for a specified species, release version, and annotation type from the GENCODE database. The file is saved to a user-specified directory or the current working directory by default.
get_gtf(species, release_version, annotation_type, dest_folder)
species |
A character string indicating the species. Supported values are:
|
release_version |
A character string specifying the release version. Options include:
|
annotation_type |
A character string specifying the annotation type. Valid options are:
|
dest_folder |
A character string specifying the destination folder where the file will be downloaded. Defaults to the current working directory. |
The function dynamically determines the correct file URL based on the provided parameters and downloads the GTF file to the desired location.
If "latest_release" is specified for release_version
, the function will first determine the latest available release using get_latest_release()
.
A character string specifying the path to the downloaded GTF file.
# Download the latest human GTF file with primary assembly annotations into a temp directory
temp_dir <- tempdir()
gtf_file <- get_gtf(
species = "human",
release_version = "latest_release",
annotation_type = "primary_assembly.basic.annotation.gtf.gz",
dest_folder = temp_dir
)
print(gtf_file)
# Download a specific mouse release with long noncoding RNA annotations into a temp directory
temp_dir <- tempdir()
gtf_file <- get_gtf(
species = "mouse",
release_version = "release_M36",
annotation_type = "long_noncoding_RNAs.gtf.gz",
dest_folder = temp_dir
)
print(gtf_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.