Question: Ggbio Autoplot Error, Negative Length Vectors Are Not Allowed
gravatar for paulr
7.2 years ago by
paulr80 wrote:

Dear all, So I'm trying to use autoplot from the Bioconductor ggbio package. For some reason, the following data and code causes an odd error.

data(hg19IdeogramCyto, package = "biovizBase")
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene <- data.frame(chromosome='chr7', begin= 6018314, end= 6018316)
actual.var <- GRanges($chromosome, IRanges($begin,$end))
p.2 <- autoplot(txdb, which = actual.var, color='blue', names.expr = "gene_id:::tx_name")

And here's the output and subsequent error

Aggregating TranscriptDb...
Parsing exons...
Parsing cds...
Parsing transcripts...
Constructing graphics...
Error in approx(c(x.s, x.e), rep(0, 2), n = N) : 
  negative length vectors are not allowed

Does GRanges require at least two coordinates? I just want to indicate where a small variant occurs.

Thanks in advance!

R bioconductor • 1.9k views
ADD COMMENTlink modified 18 months ago by Biostar ♦♦ 20 • written 7.2 years ago by paulr80
Please log in to add an answer.


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