ggbio icon indicating copy to clipboard operation
ggbio copied to clipboard

x-axis ticks are misaligned in tracks

Open cooketho opened this issue 10 years ago • 0 comments

I'm trying to make a gene model plot using the ggbio tracks function. When I do autoplot alone, it looks fine, but when I use tracks, the x-axis ticks are misaligned, as you can see by comparing the pictures below. Please see if you can reproduce the issue using the code below:

library(ggbio) library(TxDb.Hsapiens.UCSC.hg19.knownGene) txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene

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

p <- autoplot(txdb, which=wh)

p tracks(p, p)

sessionInfo() R version 3.1.2 (2014-10-31) Platform: x86_64-pc-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] stats4 parallel stats graphics grDevices utils datasets [8] methods base

other attached packages: [1] XVector_0.6.0
[2] TxDb.Hsapiens.UCSC.hg19.knownGene_3.0.0 [3] GenomicFeatures_1.18.3
[4] AnnotationDbi_1.28.1
[5] Biobase_2.26.0
[6] GenomicRanges_1.18.4
[7] GenomeInfoDb_1.2.4
[8] IRanges_2.0.1
[9] S4Vectors_0.4.0
[10] ggbio_1.14.0
[11] ggplot2_1.0.0
[12] BiocGenerics_0.12.1

loaded via a namespace (and not attached): [1] acepack_1.3-3.3 base64enc_0.1-2 BatchJobs_1.5
[4] BBmisc_1.8 BiocParallel_1.0.1 biomaRt_2.22.0
[7] Biostrings_2.34.1 biovizBase_1.14.1 bitops_1.0-6
[10] brew_1.0-6 BSgenome_1.34.1 checkmate_1.5.1
[13] cluster_1.15.3 codetools_0.2-10 colorspace_1.2-4
[16] DBI_0.3.1 dichromat_2.0-0 digest_0.6.8
[19] fail_1.2 foreach_1.4.2 foreign_0.8-62
[22] Formula_1.2-0 GenomicAlignments_1.2.1 GGally_0.5.0
[25] graph_1.44.1 grid_3.1.2 gridExtra_0.9.1
[28] gtable_0.1.2 Hmisc_3.14-6 iterators_1.0.7
[31] labeling_0.3 lattice_0.20-29 latticeExtra_0.6-26
[34] MASS_7.3-37 munsell_0.4.2 nnet_7.3-8
[37] OrganismDbi_1.8.0 plyr_1.8.1 proto_0.3-10
[40] RBGL_1.42.0 RColorBrewer_1.1-2 Rcpp_0.11.4
[43] RCurl_1.95-4.5 reshape_0.8.5 reshape2_1.4.1
[46] rpart_4.1-8 Rsamtools_1.18.2 RSQLite_1.0.0
[49] rtracklayer_1.26.2 scales_0.2.4 sendmailR_1.2-1
[52] splines_3.1.2 stringr_0.6.2 survival_2.37-7
[55] tools_3.1.2 VariantAnnotation_1.12.9 XML_3.98-1.1
[58] zlibbioc_1.12.0

test1 test2

cooketho avatar Jan 28 '15 18:01 cooketho