This function will let you use a simple character vector (e.g. 'hg19') to load and then return BSgenome objects. This lets you avoid having to use the more complex annotation for a complete BSgenome object (e.g. BSgenome.Hsapiens.UCSC.hg38.masked)
loadBSgenome(genomeBuild, masked = TRUE)
One of 'hg19', 'hg38', 'mm10', 'mm9', or 'grch38'
Should we used the masked version? Default:TRUE
A BSgenome object corresponding to the provided genome build.
if (FALSE) {
bsg = loadBSgenome('hg19')
}