我正在使用来自 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))
谢谢 :))))