This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Adding gene symbol to generegiontrack in Gviz [R]

Hello. I am trying to create a GeneRegionTrack for Gviz, using the mm10 genome. I can't seem to display the gene symbol rather than the Ensembl transcript ID in the gene track. I've tried changing the transcription annotation to gene and symbol but neither work. Please see below:

library(Gviz)
library(GenomicRanges)
library(Mus.musculus)

chr <- 'chr11'
gen <- 'mm10'

txdb <- TxDb.Mmusculus.UCSC.mm10.knownGene

grtrack <- GeneRegionTrack(txdb, genome = gen,
                           chromosome = chr, name = "UCSC known genes",
                           transcriptAnnotation='symbol')
plotTracks(grtrack, chromosome=11,from=102885336, to=102899200)

This is the output

If I change symbol to gene:

grtrack <- GeneRegionTrack(txdb, genome = gen,
                           chromosome = chr, name = "UCSC known genes",
                           transcriptAnnotation='gene')
plotTracks(grtrack, chromosome=11,from=102885336, to=102899200)

This is the new output

I want the transcript IDs to be replaced with the gene symbol. A side note that this works fine with the human genome, but not the mouse. I'm not sure why.

r gviz mm10

Please see How to add images to a Biostars post to add your images properly. You need the direct link to the image, not the link to the webpage that has the image embedded (which is what you have used here)

0 answers

No answers yet.

Log in to answer this question.