Hi there, I'm trying to generate a locus plot with the ideogram, gene track from UCSC, along with SNPs and other featured track in the hg19 version of the human genome.
Code:
library(Gviz) library(TxDb.Hsapiens.UCSC.hg19.knownGene) library(GenomicInteractions) library(rtracklayer)
from <- 61547834 to <- 61565833
knownGenes <- UcscTrack(genome = "hg19", chromosome = "chr11", track = "knownGene", from = from, to = to, trackType = "GeneRegionTrack",rstarts = "exonStarts", rends = "exonEnds", gene = "name", symbol = "name2", transcript = "name", strand = "strand",fill = "#960000", name = "Genes")
txdb_hg19 <- TxDb.Hsapiens.UCSC.hg19.knownGene
txTranscriptsv1 <- GeneRegionTrack(txdbhg19, genome="hg19", chromosome="chr11", showId=TRUE, geneSymbol=TRUE, name="UCSC")
library(org.Hs.eg.db)
symbols <- unlist(mapIds(org.Hs.eg.db, gene(txTranscripts_v1), "SYMBOL", "ENTREZID", multiVals = "first"))
symbol(txTranscriptsv1) <- symbols[gene(txTranscriptsv1)]
snpLocations <- UcscTrack(genome = "hg19", chromosome = "chr11", track = "snp151", from = from, to = to, trackType = "AnnotationTrack", start = "chromStart", end = "chromEnd", id = "name",feature = "func", strand = "strand", shape = "line",stacking = "dense", fill = "black", name = "SNPs")
enh <- UcscTrack(genome = "hg19", chromosome = "chr11", track = "vistaEnhancers", from = from, to = to, trackType = "AnnotationTrack", start = "chromStart", end = "chromEnd", id = "name",feature = "func", strand = "strand", shape = "line", fill = "black", name = "Enhancer")
plotTracks(list(ideogram.track, genome.axis.track, txTranscripts_v1, snpLocations, enh), from = from, to = to, showTitle = TRUE)
But when I look at the plot, I don't see any SNPs or Enhancers marked in the region. What am I doing wrong?