Dear ggbio developers,
I would like to use the karyogram layout in the ggbio R package to visualize some genome-wide patterns, but it seems that it is not possible to control the colors, if I use "fill" or "color" arguments outside of aes() function, although the vignette shows that this option is available. I have tried it with the data from the vignette and with my own (there are no error messages). How can I overcome this problem?
Here is a demo with the data in your vignette:
library(ggbio)
#Test the karyogram plot.
data(ideoCyto, package = "biovizBase")
ideoCyto
#Arguments 'fill' and 'color' work within aes() function.
autoplot(ideoCyto$hg19, layout='karyogram', aes(fill=gieStain))
#All chromosomes should be green, but arguments 'fill' and 'color' do not work.
autoplot(ideoCyto$hg19, layout='karyogram', fill="green")
Best regards,
Mario
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=Estonian_Estonia.1257 LC_CTYPE=Estonian_Estonia.1257 LC_MONETARY=Estonian_Estonia.1257
[4] LC_NUMERIC=C LC_TIME=Estonian_Estonia.1257
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggbio_1.18.5 ggplot2_2.1.0 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 stats4_3.2.3 rtracklayer_1.30.2
[9] GenomicFeatures_1.22.13 RBGL_1.46.0 survival_2.38-3 XML_3.98-1.4
[13] foreign_0.8-66 DBI_0.3.1 BiocParallel_1.4.3 RColorBrewer_1.1-2
[17] lambda.r_1.1.7 plyr_1.8.3 stringr_1.0.0 zlibbioc_1.16.0
[21] Biostrings_2.38.4 munsell_0.4.3 gtable_0.2.0 futile.logger_1.4.1
[25] OrganismDbi_1.12.1 labeling_0.3 latticeExtra_0.6-28 Biobase_2.30.0
[29] GGally_1.0.1 IRanges_2.4.8 biomaRt_2.26.1 BiocInstaller_1.20.1
[33] GenomeInfoDb_1.6.3 AnnotationDbi_1.32.3 Rcpp_0.12.3 acepack_1.3-3.3
[37] scales_0.4.0 BSgenome_1.38.0 S4Vectors_0.8.11 graph_1.48.0
[41] Hmisc_3.17-2 XVector_0.10.0 Rsamtools_1.22.0 gridExtra_2.2.1
[45] digest_0.6.9 stringi_1.0-1 biovizBase_1.18.0 GenomicRanges_1.22.4
[49] grid_3.2.3 tools_3.2.3 bitops_1.0-6 magrittr_1.5
[53] RCurl_1.95-4.8 RSQLite_1.0.0 dichromat_2.0-0 Formula_1.2-1
[57] cluster_2.0.3 futile.options_1.0.0 reshape_0.8.5 rpart_4.1-10
[61] GenomicAlignments_1.6.3 nnet_7.3-12