Entering edit mode
3.9 years ago
reza
▴
300
I run the same commands on the same data in Rstudio in Windows and Linux, but I get different results in step removing batch effect using “Combat” function (sva package). Running “Combat” on Windows is error-free, while on Linux I get the following error:
Error in ((dat - t(design %*% B.hat))^2) %*% rep(1/n.array, n.array) :
requires numeric/complex matrix/vector arguments
Commands
all <- read.delim("All.txt", header = T, row.names = 1)
allm <- all - rowMeans(all)
pc <- prcomp(allm)
Sets <- (c(rep("GSExxx", 30), rep("GSExxxx", 12), rep("GSExx", 14), rep("GSEx", 12)))
pcr <- data.frame(pc$r[,1:3], Sets)
allc <- ComBat(all, Sets)
how can solve this problem?
Thanks for your helps
Hello, can you please provide a minumal data example for the relevant variables that allows reproduction of the error, for example via the
dput()
function?how can I do that using dput() function?
For example
dput(head(all))
would give you a text representation that you can copy/paste of theall
variable. Please provide example data for Sets and all.AND
Dear ATpoint, you have no advice to solve this error?
The code runs without error on my machine (macOS 10.14). I suggest you post this over at
support.bioconductor.org
using thesva
tag and hope that the developers can help.