Cannot replicate VCF plot from help page
0
0
Entering edit mode
kevin.rue ▴ 350
@kevinrue-6757
Last seen 23 days ago
University of Oxford

Dear developers,

I am trying to find my way to plot VCF objects nicely, and I cannot run code from the help page (a section of "code not run" which may not have been tested in a while). Any suggestion? Thank you!

> library(VariantAnnotation)
> vcffile <- system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")
> vcf <- readVcf(vcffile, "hg19")
> ## default use type 'geno'
> ## default use genome position
> autoplot(vcf)
none geom is used
Error in data.frame(seqnames = as.factor(seqnames(x)), start = start(x),  :
  duplicate row.names: rs7410291, rs147922003, rs114143073, rs141778433, rs182170314, rs115145310, rs186769856, rs77627744, rs193230365, rs9627788, rs151129704, rs114659385, rs9627789, rs73443949, rs141100913, rs77481841, rs77619365, rs117571035, rs9616366, rs185633079, rs73443951, rs190097286, rs137922648, rs114335781, rs8135963, 22:50301488_C/T, 22:50301494_G/A, 22:50301584_C/T, 22:50301622_C/T, rs9627644, rs192916413, rs149477000, rs138658289, 22:50301957_C/CT, rs59612223, 22:50302021_CA/C, rs146271548, rs148469139, rs183994690, rs114727878, rs188676427, rs141791452, rs73181156, rs150605490, rs139702490, rs112796939, rs11702974, rs11703253, rs145507838, rs12166846, rs11704446, rs181416164, rs185259665, rs4075331, rs145358718, rs188399257, rs114264124, rs149209714, 22:50303006_A/G, rs76354698, rs75496139, rs182276967, rs143405289, rs56810176, rs115670095, rs187270471, rs4075330, rs80251032, rs150925909, rs9616367, rs9616204, rs9616368, 22:50303554_T/C, rs12167668, rs140835842

And the sessionInfo()

R version 3.3.0 (2016-05-03)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] ggbio_1.20.1               ggplot2_2.1.0              BiocInstaller_1.22.2       VariantAnnotation_1.18.1   Rsamtools_1.24.0          
 [6] Biostrings_2.40.1          XVector_0.12.0             SummarizedExperiment_1.2.2 Biobase_2.32.0             GenomicRanges_1.24.0      
[11] GenomeInfoDb_1.8.1         IRanges_2.6.0              S4Vectors_0.10.1           BiocGenerics_0.18.0       

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.5                   biovizBase_1.20.0             lattice_0.20-33               digest_0.6.9                 
 [5] mime_0.4                      R6_2.1.2                      plyr_1.8.3                    chron_2.3-47                 
 [9] acepack_1.3-3.3               RSQLite_1.0.0                 httr_1.1.0                    zlibbioc_1.18.0              
[13] GenomicFeatures_1.24.2        data.table_1.9.6              rpart_4.1-10                  Matrix_1.2-6                 
[17] splines_3.3.0                 BiocParallel_1.6.2            AnnotationHub_2.4.2           stringr_1.0.0                
[21] foreign_0.8-66                RCurl_1.95-4.8                biomaRt_2.28.0                munsell_0.4.3                
[25] shiny_0.13.2                  httpuv_1.3.3                  rtracklayer_1.32.0            htmltools_0.3.5              
[29] nnet_7.3-12                   gridExtra_2.2.1               interactiveDisplayBase_1.10.3 Hmisc_3.17-4                 
[33] XML_3.98-1.4                  reshape_0.8.5                 GenomicAlignments_1.8.0       bitops_1.0-6                 
[37] grid_3.3.0                    RBGL_1.48.1                   xtable_1.8-2                  GGally_1.0.1                 
[41] gtable_0.2.0                  DBI_0.4-1                     magrittr_1.5                  scales_0.4.0                 
[45] graph_1.50.0                  stringi_1.1.1                 reshape2_1.4.1                latticeExtra_0.6-28          
[49] Formula_1.2-1                 RColorBrewer_1.1-2            ensembldb_1.4.3               tools_3.3.0                  
[53] dichromat_2.0-0               BSgenome_1.40.0               OrganismDbi_1.14.1            rsconnect_0.4.3              
[57] survival_2.39-4               AnnotationDbi_1.34.3          colorspace_1.2-6              cluster_2.0.4   
ggbio • 925 views
ADD COMMENT

Login before adding your answer.

Traffic: 940 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