[BioC] ggbio : misplaced tracks in a test case
Abhishek Pratap
apratap at lbl.gov
Thu Jan 10 23:01:39 CET 2013
I am trying to run a test case in ggbio(based on example in a vignette) and
seem to be running into an odd case where a feature is misplaced on the
graph. working Example below
In the plot I see the variation(rectangle) is misplaced. I see it on chr3
whereas it should be on chr1. plot also attached
library(ggbio)
data(hg19Ideogram, package = "biovizBase")
## subset_chr
chr.sub <- paste("chr", 1:3, sep = "")
new.names <- as.character(1:3)
names(new.names) <- paste("chr",new.names,sep="")
hg19Ideo <- hg19Ideogram
hg19Ideo <- keepSeqlevels(hg19Ideogram,chr.sub)
hg19Ideo <- renameSeqlevels(hg19Ideo,new.names)
p <- ggplot() +
layout_circle(hg19Ideo,geom="ideo",fill="gray70",radius=30,trackWidth=4)
#adding the scale track
p <- p +
layout_circle(hg19Ideo,geom="scale",fill="gray70",size=4,radius=35,trackWidth=2)
#adding the text track
p <- p +
layout_circle(hg19Ideo,geom="text",aes(label=seqnames),vjust=0,radius=39,trackWidth=7,size=6)
#testing : placing a rect for a dummy variation
test_gr <- GRanges('1',IRanges(start=3000,width=1))
#adding the mutant track
p <- p +
layout_circle(test_gr,geom="rect",color="steelblue",radius=23,trackWidth=6)
p
Thanks!
-Abhi
> sessionInfo()R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] biovizBase_1.6.2 rtracklayer_1.18.2 ggbio_1.6.4
ggplot2_0.9.3
[5] GenomicRanges_1.10.5 IRanges_1.16.3 BiocGenerics_0.4.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_ggbio_case.png
Type: image/png
Size: 44462 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/bioconductor/attachments/20130110/03b43013/attachment.png>
More information about the Bioconductor
mailing list