ComBat-seq icon indicating copy to clipboard operation
ComBat-seq copied to clipboard

Error in order(y) : unimplemented type 'list' in 'orderVector1'

Open dea-jenaer opened this issue 2 years ago • 0 comments

Hi @zhangyuqing ,

I am trying to run batch correction with Combat-seq package but keep running into an error. The data set has 14 variables (the first 10 belong to the same batch of sequencing, the other 4 are from a different batch of sequencing). The data is read into R "as is" and i try to run batch correction. I get an error.

uncorrected = read_xlsx ( "genes_file.xlsx" , sheet = "genes" ) sample_info = read_xlsx ( "info_file.xlsx" , sheet = "sample_info" )

batches = sapply (as.character (sample_info$library), switch, "My_data" = 1, "lab2_et_al_2020" = 2, USE.NAMES = F) corrected = ComBat_seq (counts = as.matrix (uncorrected [,sample_info$file]) , batch = batches)

When I run the line of code to compute correction, then R returns "Error in order(y) : unimplemented type 'list' in 'orderVector1'" as the error message.

The same thing happens when I try to create a group vector using the following:

samples = c (0,0,0,0,0,0,0,0,0,0,1,1,1,1)

corrected = ComBat_seq (counts = as.matrix(uncorrected[,sample_info$file]), batch = batches, group = samples)

The same error message "Error in order(y) : unimplemented type 'list' in 'orderVector1' is what R returns.

I have uninstalled R (was on v 4.1.2) and reinstalled to the latest version and also install dev version of your sva package. The error still comes up unfortunately.

Do you have any idea what could be causing this?

Thanks a lot!

dea-jenaer avatar Jul 01 '22 10:07 dea-jenaer