[Bioc-devel] Gviz doesn't provide enough horizontial space

Sebastian Gibb sgibb.debian at gmail.com
Fri May 2 21:52:07 CEST 2014


Dear Florian, dear all,

thanks for the great Gviz package.

I just recognized a problem with the calculation of the width of the plotting
area for SequenceTrack. It seems that the last letter of a sequence is always
missing (and sometimes also the first letter, depending on your screen size and
the from/to arguments).

Here is a minimal example (taken from the vignette "The Gviz User Guide"
page 50):

The sequence TCCT...ACA. is plotted but it should be TCCT...ACAC .
If you decide to add 5' & 3' labels the first and the two last letters are
removed (.CCT...AC.. instead of TCCT...ACAC).

###
library(Gviz)
library(BSgenome.Hsapiens.UCSC.hg19)

sTrack <- SequenceTrack(Hsapiens)

## TCCT...ACA.
plotTracks(sTrack, chromosome = 1, from = 20000, to = 20050)

## .CCT...AC..
plotTracks(sTrack, chromosome = 1, from = 20000, to = 20050, add53=T)

Hsapiens[[1]][20000:20050]
#  51-letter "DNAString" instance
#seq: TCCTGGTGCTCCCACAAAGGAGAAGGGCTGATCACTCAAAGTTGCGAACAC
###

The problem becomes relevant to us because we want to plot peptide sequences
using the Pviz package (https://github.com/RGLab/Pviz) and we want to be sure
that the complete sequences are drawn.

Pviz provides a ProteinSequenceTrack class (based on SequenceTrack) that is
affected by this problem, e.g. see their vignette
(https://github.com/RGLab/Pviz/blob/master/vignettes/Pviz.pdf?raw=true) page 4
the first ProteinSequenceTrack example with a missing "M" on the LHS and a
missing "Y" on the RHS.

Kind regards,

Sebastian

###

My sessionInfo():

R version 3.1.0 (2014-04-10)
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] parallel  grid      stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg19_1.3.99 BSgenome_1.32.0
 [3] Biostrings_2.32.0                  XVector_0.4.0
 [5] GenomicRanges_1.16.3               GenomeInfoDb_1.0.2
 [7] IRanges_1.22.5                     Gviz_1.8.0
 [9] BiocGenerics_0.10.0                devtools_1.5
[11] vimcom.plus_0.9-93                 setwidth_1.0-3
[13] colorout_1.0-2

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.26.0     BatchJobs_1.2
 [3] BBmisc_1.6               Biobase_2.24.0
 [5] BiocParallel_0.6.0       biomaRt_2.20.0
 [7] biovizBase_1.12.1        bitops_1.0-6
 [9] brew_1.0-6               cluster_1.15.2
[11] codetools_0.2-8          colorspace_1.2-4
[13] DBI_0.2-7                dichromat_2.0-0
[15] digest_0.6.4             evaluate_0.5.5
[17] fail_1.2                 foreach_1.4.2
[19] Formula_1.1-1            GenomicAlignments_1.0.1
[21] GenomicFeatures_1.16.0   Hmisc_3.14-4
[23] httr_0.3                 iterators_1.0.7
[25] lattice_0.20-29          latticeExtra_0.6-26
[27] matrixStats_0.8.14       memoise_0.2.1
[29] munsell_0.4.2            plyr_1.8.1
[31] RColorBrewer_1.0-5       Rcpp_0.11.1
[33] RCurl_1.95-4.1           R.methodsS3_1.6.1
[35] Rsamtools_1.16.0         RSQLite_0.11.4
[37] rtracklayer_1.24.0       scales_0.2.4
[39] sendmailR_1.1-2          splines_3.1.0
[41] stats4_3.1.0             stringr_0.6.2
[43] survival_2.37-7          tools_3.1.0
[45] VariantAnnotation_1.10.0 whisker_0.3-2
[47] XML_3.98-1.1             zlibbioc_1.10.0



More information about the Bioc-devel mailing list