Open chiwwong opened 3 years ago
Hi,
I had the exact same error as you when I ran my code for ComBat-Seq with a covariate matrix. For me it worked by changing the covar_mod
input. What are your coldata_filtered$Cancer
and coldata_filtered$Treatment
?
It did the trick when changing the input for the covariates to numeric and then combinig them. For example
cancer <- as.numeric(factor(coldata_filtered$Cancer))
Hi, I had the exact same error as you when I ran my code for ComBat-Seq with a covariate matrix. For me it worked by changing the
covar_mod
input. What are yourcoldata_filtered$Cancer
andcoldata_filtered$Treatment
? It did the trick when changing the input for the covariates to numeric and then combinig them. For examplecancer <- as.numeric(factor(coldata_filtered$Cancer))
This worked for me! Thanks for posting the answer!
as.numeric(
thanks! but i am still running into the issue... @chiwwong @zhangyuqing if you were able to solve this please let me know!
I encountered the error when I ran the following:
ComBat_seq(cts, batch = coldata_filtered$Rep2, group=NULL, covar_mod=cbind(coldata_filtered$Cancer, coldata_filtered$Treatment))
Error in qr.default(design) : NA/NaN/Inf in foreign function call (arg 1)
I did a brief google search and found that it might due to 0 variance rows. I am not sure how to mitigate the error. Thanks!