[BioC] ggbio tracks with labelled: problem when I add a main title

Janet Young jayoung at fhcrc.org
Thu Dec 5 00:50:16 CET 2013


(I also just found the ggbio github bug tracker - submitted this over there, too - sorry about the double-post)


On Dec 4, 2013, at 3:32 PM, Janet Young wrote:

> Hi there,
> 
> I think I found a problem with the way ggbio handles track labels when I add a main title to the plot.  I think the code I've included below should demonstrate the problem, but let me know if it's not clear. 
> 
> (and thanks for the nice package!)
> 
> Janet
> 
> 
> library(ggbio)
> 
> ## example tracks (taken from ?tracks)
> df1 <- data.frame(time = 1:100, score = sin((1:100)/20)*10)
> p1 <- qplot(data = df1, x = time, y = score, geom = "line")
> df2 <- data.frame(time = 30:120, score = sin((30:120)/20)*10, value = rnorm(120-30 + 1))
> p2 <- ggplot(data = df2, aes(x = time, y = score)) + 
>  geom_line() + geom_point(size = 4, aes(color = value))
> 
> ### plot two tracks with a label - this looks OK
> tracks (p1, p2, main="myTitle")
> 
> ### plot two labelled tracks - this look OK
> tracks (p1=p1, p2=p2)
> 
> ### adding title to the plot with labelled tracks messes up alignment of the labels with the plot
> tracks (p1=p1, p2=p2, main="myTitle")
> 
> sessionInfo()
> 
> R Under development (unstable) (2013-11-06 r64163)
> Platform: x86_64-unknown-linux-gnu (64-bit)
> 
> locale:
> [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
> [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
> [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
> [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
> [9] LC_ADDRESS=C               LC_TELEPHONE=C            
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base     
> 
> other attached packages:
> [1] ggbio_1.11.7    ggplot2_0.9.3.1
> 
> loaded via a namespace (and not attached):
> [1] AnnotationDbi_1.25.9     Biobase_2.23.3           BiocGenerics_0.9.1      
> [4] biomaRt_2.19.1           Biostrings_2.31.3        biovizBase_1.11.6       
> [7] bitops_1.0-6             BSgenome_1.31.7          cluster_1.14.4          
> [10] colorspace_1.2-4         DBI_0.2-7                dichromat_2.0-0         
> [13] digest_0.6.4             Formula_1.1-1            GenomicAlignments_0.99.4
> [16] GenomicFeatures_1.15.4   GenomicRanges_1.15.10    grid_3.1.0              
> [19] gridExtra_0.9.1          gtable_0.1.2             Hmisc_3.13-0            
> [22] IRanges_1.21.13          labeling_0.2             lattice_0.20-24         
> [25] MASS_7.3-29              munsell_0.4.2            parallel_3.1.0          
> [28] plyr_1.8                 proto_0.3-10             RColorBrewer_1.0-5      
> [31] RCurl_1.95-4.1           reshape2_1.2.2           Rsamtools_1.15.12       
> [34] RSQLite_0.11.4           rtracklayer_1.23.3       scales_0.2.3            
> [37] splines_3.1.0            stats4_3.1.0             stringr_0.6.2           
> [40] survival_2.37-4          tools_3.1.0              VariantAnnotation_1.9.13
> [43] XML_3.98-1.1             XVector_0.3.2            zlibbioc_1.9.0          
> 
> 
> 
> 
> 
> ------------------------------------------------------------------- 
> 
> Dr. Janet Young 
> 
> Malik lab
> http://research.fhcrc.org/malik/en.html
> 
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Avenue N., A2-025, 
> P.O. Box 19024, Seattle, WA 98109-1024, USA.
> 
> tel: (206) 667 4512
> email: jayoung  ...at...  fhcrc.org
> 
> ------------------------------------------------------------------- 
> 



More information about the Bioconductor mailing list