Entering edit mode
7.7 years ago
ashwani.vit
•
0
Hello,
While running exomeDepth, I got the following error:
Error in [<-.data.frame
(*tmp*
, , column.name, value = c(NA_character_, :
replacement has 2 rows, data has 0
Calls: AnnotateExtra -> AnnotateExtra -> [<- -> [<-.data.frame
I have 2 control samples and 2 test samples. Please help out!
Regards, Ashwani
Could you post all code up to the point the error was produced?
for (i in 1:nsamples){ my.choice <- select.reference.set (test.counts = ExomeCount.mat[,i], reference.counts = my.reference.set, bin.length = (ExomeCount.dafr$end - ExomeCount.dafr$start)/1000, n.bins.reduced = 10000) my.matrix <- as.matrix(ExomeCount.dafr[, my.choice$reference.choice,drop=FALSE]) my.reference.selected <- apply(X=my.matrix,MAR = 1,FUN = sum)
all.exons <- new('ExomeDepth', test = ExomeCount.mat[,i], reference = my.reference.selected, formula = 'cbind(test, reference) ~ 1')
all.exons <- CallCNVs(x = all.exons, transition.probability = 10^-4, chromosome = ExomeCount.dafr$space, start = ExomeCount.dafr$start, end = ExomeCount.dafr$end, name = ExomeCount.dafr$names) #head(all.exons@CNV.calls) #head(all.exons@CNV.calls[order (all.exons@CNV.calls$BF,decreasing=TRUE),])
exons.hg19.X.GRanges <- GRanges(seqnames = exons.hg19.X$chromosome, IRanges(start=exons.hg19.X$start,end=exons.hg19.X$end), names = exons.hg19.X$name) all.exons <- AnnotateExtra(x = all.exons, reference.annotation = exons.hg19.X.GRanges, min.overlap = 0.0001, column.name = 'exons.hg19.X')
}
The error is thrown at the annotation stage. I am using exons,hg19.X.