1
我正在使用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上的方式..有人幫我請:)
感謝我所需要的:) – madkitty