dviraran / SingleR

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

CreatSinglerobject error #100

Open wwn7268 opened 5 years ago

wwn7268 commented 5 years ago

Hi, When I use single to crest obj with large dataset singler = CreateSinglerObject(counts, annot = NULL, project.name="interaction", min.genes = 0, technology = "10X", species = "Human", citation = "", ref.list = list(), normalize.gene.length = F, variable.genes = "de", fine.tune = T, do.signatures = T, clusters =NULL , do.main.types = T, reduce.file.size = T, numCores = SingleR.numCores)

It will have error like: Error in if (xor(((x[n] - mean(x)) < (mean(x) - x[1])), opposite)) { : argument is of length zero

How can I solve it?

dviraran commented 5 years ago

I don't think that this is because you are using a large dataset. This usually happens when there are cells with very low number of non-zero genes. The input counts should be the filtered dataset you have in your single-cell object. It can also happen if your gene names are not gene symbols.

Best, Dvir

wwn7268 commented 5 years ago

Yes, actually I have filtered the data. However it still have too much zero expression, only about 7% is non-zero. Moreover, you mean genes name should be words like "LRP1"?