【发布时间】:2012-06-15 14:49:15
【问题描述】:
我正在使用来自 bioconductor 的 Gviz 库。我输入了一个制表符分隔文件,其中包含我需要在我的染色体表意文字上绘制的 CNV 位置。
我的输入文件由 dat 定义,有 4 列
- [1] 染色体
- [2]开始
- [3]结束
- [4] 宽度(可以是“+”或“-”,具体取决于拷贝数的方向)
所以我这样做了:
library(IRanges)
libraray(Gviz)
gen <- "mm9"
chr <- "chr1"
itrack <- IdeogramTrack(genome = gen, chromosome = chr)
gtrack <- GenomeAxisTrack()
dat <- read.delim("C:/R/1ips_chr1.txt", header = FALSE, sep ="\t")
s <- dat[2]
e <- dat[3]
l <- dat[4]
当我调用文件 dat 时它显示一条错误消息:
atrack1 <- AnnotationTrack( start = s, width = l , chromosome = chr, genome = gen, name = "Sample1")
Error : function (classes, fdef, mtable) : unable to find an inherited method for function ".buildRange", for signature "NULL", "data.frame", "NULL", "data.frame"
显然我调用输入文件(在 dat 中)的方式不满足 R .. 请有人帮助我:)
【问题讨论】:
标签: file r input bioconductor