No color support in ggbio for autoplot
1
0
Entering edit mode
@timothypyork-9590
Last seen 8.9 years ago

Can anyone identify whether I am doing something wrong or if there is a bug in the recent ggbio version?  There seems to be no color support for Granges objects with the autoplot function.  The vignette example in the ggbio does not produce the desired color for the gene model :

library('ggbio')
library('Homo.sapiens')

data(genesymbol, package = "biovizBase")
wh <- genesymbol[c("BRCA1", "NBR1")]
wh <- range(wh, ignore.strand = TRUE)

autoplot(Homo.sapiens, which  = wh, label.color = "black", color = "brown", fill = "brown")

 

sessionInfo()

R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.1 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] Homo.sapiens_1.3.1                      TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
 [3] org.Hs.eg.db_3.2.3                      GO.db_3.2.2                            
 [5] RSQLite_1.0.0                           DBI_0.3.1                              
 [7] OrganismDbi_1.12.1                      GenomicFeatures_1.22.8                 
 [9] GenomicRanges_1.22.3                    GenomeInfoDb_1.6.2                     
[11] AnnotationDbi_1.32.3                    IRanges_2.4.6                          
[13] S4Vectors_0.8.7                         Biobase_2.30.0                         
[15] ggbio_1.18.3                            ggplot2_2.0.0                          
[17] BiocGenerics_0.16.1                    

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.0.2 VariantAnnotation_1.16.4   reshape2_1.4.1             splines_3.2.3             
 [5] lattice_0.20-33            colorspace_1.2-6           rtracklayer_1.30.1         RBGL_1.46.0               
 [9] survival_2.38-3            XML_3.98-1.3               foreign_0.8-66             BiocParallel_1.4.3        
[13] RColorBrewer_1.1-2         lambda.r_1.1.7             plyr_1.8.3                 stringr_1.0.0             
[17] zlibbioc_1.16.0            Biostrings_2.38.3          munsell_0.4.2              gtable_0.1.2              
[21] futile.logger_1.4.1        labeling_0.3               latticeExtra_0.6-26        GGally_1.0.1              
[25] biomaRt_2.26.1             BiocInstaller_1.20.1       Rcpp_0.12.3                acepack_1.3-3.3           
[29] scales_0.3.0               BSgenome_1.38.0            graph_1.48.0               Hmisc_3.17-1              
[33] XVector_0.10.0             Rsamtools_1.22.0           gridExtra_2.0.0            stringi_1.0-1             
[37] biovizBase_1.18.0          grid_3.2.3                 tools_3.2.3                bitops_1.0-6              
[41] magrittr_1.5               RCurl_1.95-4.7             dichromat_2.0-0            Formula_1.2-1             
[45] cluster_2.0.3              futile.options_1.0.0       reshape_0.8.5              rpart_4.1-10              
[49] GenomicAlignments_1.6.3    nnet_7.3-11             

 

 

 

 

 

 

 

ggbio autoplot color vignette • 2.5k views
ADD COMMENT
1
Entering edit mode
aaron ▴ 10
@aaron-6870
Last seen 6.6 years ago
United States

Hi Timothy,

Looks like a bug causing ggbio to silently drop those arguments. The vignette even contains several figures that ignored the color argument.

You can workaround this issue by mapping colors to color and fill within aes() and using identity scales. For example:

autoplot(Homo.sapiens, aes(fill = "brown", color = "brown"), which = wh) + 
  scale_fill_identity() + 
  scale_color_identity()

 

ADD COMMENT
0
Entering edit mode

Perfect.  Thanks for the work around.  How can we alert the developer of the bug ?

ADD REPLY
1
Entering edit mode

The maintainer is aware of this, I believe. Package maintainers are supposed to 'subscribe' to the tag that corresponds to their package (see the How can I keep track of topics that interest me? section of the FAQ), so your use of the ggbio tag is all that is required. Some packages mention a BugReports: in the DESCRIPTION file, and these are present on the package landing page. The landing pages are available through the relatively memorable https://bioconductor.org/packages/ggbio or by searching for the package at the top of the bioconductor.org home page, or from within R packageDescription("ggbio")$BugReports.

ADD REPLY

Login before adding your answer.

Traffic: 566 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6