library("Gviz")
gen <- "hg38"
chr <- "chr7"
start <- 38203219
end <- 38303219
IdType <- "name"
if(interactive()) {
genesUcsctrack<-refGenes_UCSC(gen,chr,start,end,IdType)
plotTracks(genesUcsctrack, from = start, to =end)
}else {
data(genesUcsctrack)
plotTracks(genesUcsctrack, from = start, to =end)
}
Run the code above in your browser using DataLab