wb_get_gtf_path: Get path to cached GTF file

View source: R/load_gtf.R

wb_get_gtf_pathR Documentation

Get path to cached GTF file

Description

Returns the path to a GTF file in the cache. Useful to use with functions that require a connection to read from (e.g. to create a TxDb for Bioconductor packages). The file gets downloaded as necessary.

Usage

wb_get_gtf_path(WS, dir_cache = NULL)

Arguments

WS

Wormbase release version.

dir_cache

Directory where the downloaded files are cached.

Details

For the TxDB creation, see also 'wb_load_txdb()' which does it automatically.

Value

a character string pointing to a "c_elegans.PRJNA13758.WSxxx.canonical_geneset.gtf.gz" file.

Examples

## Not run: 
library(GenomicFeatures)
library(wbData)

path_to_gtf <- wb_get_gtf_path(273)
my_txdb <- makeTxDbFromGFF(path_to_gtf,dataSource = "Wormbase",organism = "Caenorhabditis elegans")
gids <- wb_load_gene_ids(273)
select(my_txdb, keys = s2i("nduo-3", gids), columns = "TXSTART", keytype = "GENEID")

## End(Not run)

AlexWeinreb/wbData documentation built on April 3, 2025, 1:24 p.m.