[BioC] Gviz Incorrect Labels on Features

Lance Parsons lparsons at princeton.edu
Wed May 21 17:53:40 CEST 2014


I have run into what appears to be a bug with GViz labels, though 
perhaps I'm using the annotations incorrectly.  The following minimal 
example seems to plot the correct features, but with the labels mixed 
up.  I suspect the issue has to do with the sorting (or lack thereof) of 
the features in the GRanges list, however, I'm not sure of the proper 
workaround.  Any help would be appreciated.

# Gviz annotation label mixup

library(Gviz)
library(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene)
txdb <- TxDb.Scerevisiae.UCSC.sacCer3.sgdGene
chr = 'chrVIII'
start=212535 - 500
end=214718 + 2000
grtrack = GeneRegionTrack(txdb, chromosome=chr, start=start, end=end, 
showId=TRUE, shape='fixedArrow')
grtrack at range
plotTracks(grtrack)


Here you can see that YHR054W-A should be plotted at 214508 and in the 
forward direction.  However, that is clearly not the case in the plot.


GRanges with 6 ranges and 7 metadata columns:
       seqnames           ranges strand |     feature          id        
exon  transcript        gene      symbol   density
<Rle> <IRanges> <Rle> | <character> <character> <character> <character> 
<character> <character> <numeric>
   [1]  chrVIII [212510, 212704]      + |         CDS     unknown 
YHR052W-A_1   YHR052W-A   YHR052W-A   YHR052W-A         1
   [2]  chrVIII [214508, 214702]      + |         CDS     unknown 
YHR054W-A_1   YHR054W-A   YHR054W-A   YHR054W-A         1
   [3]  chrVIII [212535, 212720]      - |         CDS     unknown   
YHR053C_1     YHR053C     YHR053C     YHR053C         1
   [4]  chrVIII [213185, 214249]      - |         CDS     unknown   
YHR054C_1     YHR054C     YHR054C     YHR054C         1
   [5]  chrVIII [214533, 214718]      - |         CDS     unknown   
YHR055C_1     YHR055C     YHR055C     YHR055C         1
   [6]  chrVIII [215183, 217834]      - |         CDS     unknown   
YHR056C_1     YHR056C     YHR056C     YHR056C         1
   ---
   seqlengths:
    chrVIII
         NA



-- 
Lance Parsons - Scientific Programmer
134 Carl C. Icahn Laboratory
Lewis-Sigler Institute for Integrative Genomics
Princeton University



More information about the Bioconductor mailing list