dviraran / SingleR

SingleR: Single-cell RNA-seq cell types Recognition (legacy version)
GNU General Public License v3.0
263 stars 98 forks source link

Error in if (xor(((x[n] - mean(x)) < (mean(x) - x[1])), opposite)) { : argument is of length zero #112

Open royfrancis opened 4 years ago

royfrancis commented 4 years ago

I am running SingleR as shown below.

x <- readRDS("matrix.Rds")
out <- CreateSinglerObject(
  counts=x,
  project.name="x",
  min.genes=200,
  ref.list=list(hpca=hpca,bpe=blueprint_encode),
  fine.tune=FALSE,
  do.main.types=TRUE,
  numCores=6)

I get the following error:

[1] "Dimensions of counts data: 55139x648"
[1] "Annotating data with HPCA..."
[1] "Variable genes method: de"
[1] "Number of DE genes:0"
[1] "Number of cells: 648"
Error in if (xor(((x[n] - mean(x)) < (mean(x) - x[1])), opposite)) { : 
  argument is of length zero

I am attaching the data matrix as an Rds object. It is zipped because GitHub complains when it ends in Rds. matrix.zip

Running SingleR 1.0.1 in R 3.6.0.