Question: ggbio error when autoplot on PTPN11 gene
0
gravatar for Saad Khan
4.8 years ago by
Saad Khan340
United States
Saad Khan340 wrote:

Hi 

I was wondering if any of you has used "ggbio" before. I was going through its manual and for some of the examples I can not make it work with certain genes. In my case I was trying to use it with "PTPN11" gene using the following code

library(ggbio)
library(GenomicRanges)
library(BSgenome.Hsapiens.UCSC.hg19)
library(biovizBase)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(VariantAnnotation)
library(Homo.sapiens)

data(genesymbol, package = "biovizBase")

wh <- genesymbol['PTPN11']
 p.txdb <- autoplot(Homo.sapiens, which = wh)

 

It throws the following error

gap" is not matching to following arbitrary model terms"cds CDS Cds exon EXON Exon utr UTR Utr"

Constructing graphics...
Error in `[[<-`(`*tmp*`, name, value = 1L) : 
  1 elements in value to replace 0 elements
Calls: apply ... <Anonymous> -> .local -> .hackFun -> $<- -> $<- -> [[<- -> [[<-
Execution halted

In some forums I have found that installing new version of ggbio could solve the problem. But I am unable to do so using :-

library(BiocInstaller)
useDevel()

or downloading the svn repository using svn checkout tarring it and installing it using R CMD INSTALL.

I have tried mailing the author but I have not heard from him yet. This is the graph that gets generated using full code that I have. It works for certain genes and not for others.

https://drive.google.com/file/d/0B9g-QPZ8EqmUMjJzRElTTWZIaGM/edit?usp=sharing

I was wondering if somebody has dealt with this ggbio problem before and suggest possible solutions regarding the same.

Also if there is a better way to do the same.

Thanks

 

 

 

 

 

plots ggbio tracks • 1.9k views
ADD COMMENTlink modified 4.6 years ago by Giovanni M Dall'Olio26k • written 4.8 years ago by Saad Khan340
1
gravatar for Giovanni M Dall'Olio
4.6 years ago by
London, UK
Giovanni M Dall'Olio26k wrote:

I tried the same code on my computer and it works. I also got a warning about the gap model, but not the error about about replacing 0 elements. My version of ggbio is 1.14.0, so you don't need to install the development version. Which version of ggbio are you using? Have you tried running the code on a clean environment, without other variables or packages loaded?

ADD COMMENTlink modified 4.6 years ago • written 4.6 years ago by Giovanni M Dall'Olio26k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1608 users visited in the last hour