Error using Gviz and BiomartGeneRegionTrack, version problem?
2
0
Entering edit mode
br • 0
@br-12537
Last seen 7.4 years ago
Dear all, Dear Florian

I am learning bioconductor recently using the Gviz-package and biomart in order to load a BiomartGeneRegionTrack to my stickleback genome. I encountered a small problem as it is reporting an error.  

First step- ​Question here, is this a database problem? Or am I missing some important command and information? 

library(Gviz)
library(BSgenome.Gaculeatus.UCSC.gasAcu1)
biomTrack <- BiomartGeneRegionTrack(genome = "gasacu1",chromosome = "chrI", start = 20000000, end = 21000000,name = "ENSEMBL")
Fehler in .getBiomart(genome) :
  Gviz thinks that the UCSC genome identifier 'gasacu1' should map to the current Biomart head as 'BROADS1', but its current version is 'BROAD S1'.
Please manually provide biomaRt object

Second step- In case this is not solvable I already tried to follow the instructions as I managed to load the biomart object manually - however with new problems. I think I would open up a second question, if this here is not solvable. 
​Please help me to transfer ucsc and ensemble annotations via biomart. Either with the first step "automatically" or than later in my workaround. 
Best wishes and thanks a lot. 

sessionInfo()

R version 3.3.2 (2016-10-31)

Platform: x86_64-apple-darwin13.4.0 (64-bit)

Running under: OS X Mavericks 10.9.5

locale:

[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8

attached base packages:

[1] grid      parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:

[1] gridExtra_2.2.1                        reshape2_1.4.2                         gtable_0.2.0                         

[4] ggplot2_2.2.1                          dplyr_0.5.0                            RColorBrewer_1.1-2                   

[7] BSgenome.Gaculeatus.UCSC.gasAcu1_1.4.0 BSgenome_1.42.0                        GenomicFeatures_1.26.3               

[10] AnnotationDbi_1.36.2                   Biobase_2.34.0                         rtracklayer_1.34.2                   

[13] Biostrings_2.42.1                      XVector_0.14.0                         biomartr_0.3.0                       

[16] biomaRt_2.30.0                         Gviz_1.18.1                            GenomicRanges_1.26.3                 

[19] GenomeInfoDb_1.10.3                    IRanges_2.8.1                          S4Vectors_0.12.1                     

[22] BiocGenerics_0.20.0                  

loaded via a namespace (and not attached):

[1] httr_1.2.1                    AnnotationHub_2.6.4           splines_3.3.2                 Formula_1.2-1               

[5] shiny_1.0.0                   assertthat_0.1                interactiveDisplayBase_1.12.0 latticeExtra_0.6-28         

[9] Rsamtools_1.26.1              yaml_2.1.14                   RSQLite_1.1-2                 backports_1.0.5             

[13] lattice_0.20-34               biovizBase_1.22.0             digest_0.6.12                 checkmate_1.8.2             

[17] colorspace_1.3-2              htmltools_0.3.5               httpuv_1.3.3                  Matrix_1.2-8                

[21] plyr_1.8.4                    XML_3.98-1.5                  zlibbioc_1.20.0               xtable_1.8-2                

[25] scales_0.4.1                  BiocParallel_1.8.1            htmlTable_1.9                 tibble_1.2                  

[29] SummarizedExperiment_1.4.0    nnet_7.3-12                   lazyeval_0.2.0                survival_2.40-1             

[33] magrittr_1.5                  mime_0.5                      memoise_1.0.0                 foreign_0.8-67              

[37] BiocInstaller_1.24.0          tools_3.3.2                   data.table_1.10.4             matrixStats_0.51.0          

[41] stringr_1.2.0                 munsell_0.4.3                 cluster_2.0.5                 ensembldb_1.6.2             

[45] RCurl_1.95-4.8                dichromat_2.0-0               VariantAnnotation_1.20.2      htmlwidgets_0.8             

[49] labeling_0.3                  bitops_1.0-6                  base64enc_0.1-3               DBI_0.5-1                   

[53] R6_2.2.0                      GenomicAlignments_1.10.0      knitr_1.15.1                  Hmisc_4.0-2                 

[57] stringi_1.1.2                 Rcpp_0.12.9                   rpart_4.1-10                  acepack_1.4.1     

> traceback()

8: stop(sprintf(paste("Gviz thinks that the UCSC genome identifier '%s' should map to the current Biomart head as '%s',",

       "but its current version is '%s'.\nPlease manually provide biomaRt object"),

       genome, map$value, mt))

7: .getBiomart(genome)

6: eval(expr, envir, enclos)

5: eval(expression, envir = callEnv)

4: eval(expression, envir = callEnv)

3: .doCache(paste(map$dataset, genome, sep = "_"), expression(.getBiomart(genome)),

       .ensemblCache, cenv)

2: .genome2Dataset(genome)

1: BiomartGeneRegionTrack(genome = "gasacu1", chromosome = chr,

       start = 20000000, end = 21000000, name = "ENSEMBL")

 

Gviz-package biomart plottracks ucsctrack stickleback • 3.2k views
ADD COMMENT
1
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

It looks like the information recorded in Gviz about which genome version to expect from the latest Ensembl version is out of date, or it has a different spelling. I will take a look at this and update the definitions, but that might take a few days to make it into the release branch.

Not sure what exactly failed when you tried to use an explicit biomart object:

 

library(Gviz)
library(biomaRt)
options(ucscChromosomeNames=FALSE)
bt <- BiomartGeneRegionTrack(genome = "gasacu1", chromosome = "groupI", start=18508123, end=18537196, name = "ENSEMBL", biomart=useMart(biomart="ensembl", dataset="gaculeatus_gene_ensembl"))
plotTracks(bt, transcriptAnnotation="symbol")

Florian

ADD COMMENT
0
Entering edit mode

Once Gviz version 1.18.2 becomes available you can go directly with the default biomart solution:

options(ucscChromosomeNames=FALSE)
biomTrack <- BiomartGeneRegionTrack(genome = "gasacu1",chromosome = "groupI", start = 20000000, end = 21000000,name = "ENSEMBL")

Please note that ESEMBL uses "groupI" and not "chrI" as chromosome identifier.

ADD REPLY
0
Entering edit mode

Hey Florian,

Thanks a lot, that spelling thing is what I thought was making the problem. Great that you are going to update the Gviz package. Yes I also managed to create a biomartgeneregiontrack in your proposed way before, but there is an issue if I mix several tracks - is it possible to replace chromosome = "groupI" with "chrI", so that several tracks from e.g. UCSC and Biomart can be plotted in one plot?

Best Br

 

ADD REPLY
1
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

Well, this is a bit problematic if you are dealing with dynamic data sources like Biomart and UCSC. You can always transform a BiomartGeneRegionTrack into a regular GeneRegionTrack by calling

as(biomTrack, "GeneRegionTrack")

and at that stage you can manipulate the GRanges object inside the track to change the chromosome label. There should be documentation how to do that in the GenomicRanges package. Also the topic has come up for Gviz in the forum before.

You may also want to take a look at http://bioconductor.org/packages/release/bioc/html/ensembldb.html for an alternative option to create Gviz plots from ENSEMBL data.

Florian

ADD COMMENT

Login before adding your answer.

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