Gviz::plotTracks for BiomartGeneRegionTrack() produces empty plots
4
0
Entering edit mode
Asta Laiho ▴ 120
@asta-laiho-4271
Last seen 8.8 years ago
Finland

 

Hi,

I’m trying to plot gene models in a specific region using Gviz package and BiomartGeneRegionTrack function. I have tried with different regions and genomes (one below as an example) but the returned plot is always empty although the regions should contain annotated Ensemble genes. When I plot other tracks (e.g. based on local annotation files) the plotting works normally. Any ideas what might cause the problem?


biomartTrack <- BiomartGeneRegionTrack(genome="hg19", chromosome="chr17", start=41277600, end=41280000, name="ENSEMBL")

biomartTrack

GeneRegionTrack 'ENSEMBL'
| genome: hg19
| active chromosome: chr17
| annotation features: 0
There are 3 additional annotation features on 1 further chromosome (17)
​Call chromosome(obj) <- 'chrId' to change the active chromosome


plotTracks(biomartTrack, from=41277500, to=41280100)

Many thanks for help,
Asta

 

 

> sessionInfo()                                                                                      R version 3.1.2 (2014-10-31)                  
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=C                 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] grid      stats4    parallel  stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] ChIPpeakAnno_2.16.4  AnnotationDbi_1.28.1 Biobase_2.26.0      
 [4] Biostrings_2.34.1    VennDiagram_1.6.9    BiocInstaller_1.16.1
 [7] biomaRt_2.22.0       XVector_0.6.0        limma_3.22.2        
[10] gtools_3.4.1         plyr_1.8.1           cummeRbund_2.8.2    
[13] Gviz_1.10.5          rtracklayer_1.26.2   GenomicRanges_1.18.4
[16] GenomeInfoDb_1.2.4   IRanges_2.0.1        S4Vectors_0.4.0     
[19] fastcluster_1.1.15   reshape2_1.4.1       ggplot2_1.0.0       
[22] RSQLite_1.0.0        DBI_0.3.1            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.0       biovizBase_1.14.1       
 [7] bitops_1.0-6             brew_1.0-6               BSgenome_1.34.1         
[10] checkmate_1.5.1          cluster_1.15.3           codetools_0.2-9         
[13] colorspace_1.2-4         dichromat_2.0-0          digest_0.6.8            
[16] fail_1.2                 foreach_1.4.2            foreign_0.8-62          
[19] Formula_1.1-2            GenomicAlignments_1.2.1  GenomicFeatures_1.18.3  
[22] GO.db_3.0.0              gtable_0.1.2             Hmisc_3.14-6            
[25] iterators_1.0.7          labeling_0.3             lattice_0.20-29         
[28] latticeExtra_0.6-26      MASS_7.3-37              matrixStats_0.12.2      
[31] multtest_2.22.0          munsell_0.4.2            nnet_7.3-8              
[34] proto_0.3-10             R.methodsS3_1.6.1        RColorBrewer_1.1-2      
[37] Rcpp_0.11.3              RCurl_1.95-4.5           rpart_4.1-8             
[40] Rsamtools_1.18.2         scales_0.2.4             sendmailR_1.2-1         
[43] splines_3.1.2            stringr_0.6.2            survival_2.37-7         
[46] tools_3.1.2              VariantAnnotation_1.12.8 XML_3.98-1.1            
[49] zlibbioc_1.12.0 

gviz visualization • 3.1k views
ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

Hi Asta,

this is a genome version issue. Biomart uses as the default genome GrCH38, which is called hg20 in UCSC lingo. The internal mapping in Gviz seems to be outdated, so it still tries to fetch hg19 coordinates from the new hg20 genome, and I will have to fix that. However, to solve you problem you will have to connect to an older Biomart as explained in the vignette:

library(biomaRt)

bm <- useMart(host="feb2014.archive.ensembl.org",biomart="ENSEMBL_MART_ENSEMBL",dataset="hsapiens_gene_ensembl")
fm <- Gviz:::.getBMFeatureMap()
fm["symbol"] <- "external_gene_id"

biomartTrack <- BiomartGeneRegionTrack(genome="hg19", chromosome="chr17", start=41277600, end=41280000, name="ENSEMBL", biomart=bm, featureMap=fm)

plotTracks(biomartTrack, from=41277500, to=41280100)

I will try to come up with a better solution in the next release to automatically map to the respective archived genome for these older versions.

Florian

ADD COMMENT
0
Entering edit mode

Hi Florian

just a quick comment:   GrCH38, is called "hg38" at UCSC (see: http://hgdownload.soe.ucsc.edu/downloads.html#human)

Hans-Rudolf

ADD REPLY
0
Entering edit mode

Ah, yeah, you're right. Thanks for the note.

ADD REPLY
0
Entering edit mode
Asta Laiho ▴ 120
@asta-laiho-4271
Last seen 8.8 years ago
Finland

Hi Florian,

Thanks for the advice, this way it indeed seems to work for hg19. I would also need to produce plots for mm10 and I still get only empty plots even after trying:

 bm <- useMart(host="feb2014.archive.ensembl.org",biomart="ENSEMBL_MART_ENSEMBL",dataset="mmusculus_gene_ensembl")
  fm <- Gviz:::.getBMFeatureMap()
  fm["symbol"] <- "external_gene_id"
  biomTrack<-BiomartGeneRegionTrack(genome="mm10",chromosome=as.character(myChr), start=myStart,end=myEnd,name="ENSEMBL",showId=T, biomart=bm, featureMap=fm)

with different regions such as:

chr17:74105243-74295471
chr19:6119395-6132559
chr2:48814108-49317069
chr2:172345535-172355749
chr4:87769259-88033407
chr4:87769259-88033407
chr5:110828974-110839784
chr7:24884623-24889841

which all should contain annotated genes.

ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

Could you update your Gviz package to version 1.10.6, please. I have just back-ported the necessary changes for the BiomartGeneRegionTrack class to automatically figure out the necessary Biomart stores for older genomes. Things should now work out of the box without the work-around I suggested earlier:

plotTracks(BiomartGeneRegionTrack(genome="mm10", chromosome="chr17", start=74105243, end=74295471, name="ENSEMBL",showId=T))
plotTracks(BiomartGeneRegionTrack(genome="mm10", chromosome="chr4", start=87769259, end=88033407, name="ENSEMBL",showId=T))
ADD COMMENT
0
Entering edit mode
Asta Laiho ▴ 120
@asta-laiho-4271
Last seen 8.8 years ago
Finland

Many thanks - it works perfectly now! :)

ADD COMMENT

Login before adding your answer.

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