【发布时间】:2012-06-16 07:20:48
【问题描述】:
我正在使用 Bioconductor 的 Gviz 库,我正在尝试绘制从技术上从左到右绘制的表意文字,但我们的数据有一些负宽度表明该图应该来自右到左。 如何使用 IRanges 为宽度输入负值?
这是我们正在使用的代码:
library(Gviz)
library(IRanges)
gen <- "mm9"
chr <- "chr1"
itrack <- IdeogramTrack(genome = gen, chromosome = chr)
gtrack <- GenomeAxisTrack()
dat <- read.delim("C:/R/mydata.TXT", header = FALSE, sep ="\t")
s <- dat[[2]]
e <- dat[[3]]
l <- dat[[4]]
annot1 = IRanges(start = s, width = l)
Error.Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges") :
solving row 1: negative widths are not allowed
# Those logical following commands work well if no negative integer is passed to IRanges
atrack <- AnnotationTrack (annot1, chromosome = chr, genome = gen, name = "foo")
plotTracks (list(itrack, gtrack, atrack))
谢谢:)))))
【问题讨论】:
标签: r bioconductor