Record a preferred genome string (e.g., "hg38" / "GRCh38") in the session options so that functions like annotateWindows() can use it when genome is not explicitly supplied.

setMesaGenome(genome)

Arguments

genome

character(1) or NULL. Genome identifier to store (typically "hg38" or "GRCh38"). Use NULL to clear the setting. Default: none (must be supplied).

Value

Invisibly returns TRUE on success.

Details

This function sets the session option options(mesa_genome = <genome>). It does not modify TxDb or OrgDb options directly; set those via setMesaTxDb() and setMesaAnnoDb() if you want global defaults for transcript and gene annotation packages. Helpers such as annotateWindows() consult getOption("mesa_genome") when genome is missing.

Examples

# Set the default genome to hg38
setMesaGenome("hg38")
getOption("mesa_genome")
#> [1] "hg38"

# Use the GRCh38 alias
setMesaGenome("GRCh38")
getOption("mesa_genome")
#> [1] "GRCh38"

# Reset/remove the default genome
setMesaGenome(NULL)
is.null(getOption("mesa_genome"))
#> [1] TRUE