ref_load`` loads reference annotation using [makeTxDbFromGFF][GenomicFeatures::makeTxDbFromGFF] if a character or leaves ref` unchanged if already a TxDb-class. If you would

ref_load(ref)

Arguments

ref

either path to gtf/gff3 or object of class TxDb-class or EnsDb-class. EnsDb-class is required if you intend to annotate junctions with gene symbols/names.

Value

a TxDb-class object.

Examples


# create a TxDb,
ref <- GenomicState::GenomicStateHub(
    version = "31",
    genome = "hg38",
    filetype = "TxDb"
)[[1]]
#> snapshotDate(): 2021-10-20
#> loading from cache

# alternatively ref can be a character specifying a path to a GTF file
ref <- ref_load(ref)