Error when using findmarkergenes function
ivy-yuan opened this issue · 4 comments
I want to annotate the cells of bone marrow using scCATCH. I followed the steps descriped in tutorial, but encountered an error when using findmarkergenes function. Here are my code and the details of the error. Could anyone help me with this error?
>scCATCH_obj <- findmarkergene(object = scCATCH_obj, species = "Human", me marrow")
There are 354 potential marker genes in CellMatch database for Human on Bone marrow.
Error in apply(ndata1, 1, .percent_cell) : dim(X) must have a positive length
It is because scCATCH_obj
have a cluster only with one cell. You can take a look at the cell number of each cluster.
I also got the same error when running findmarkergene. I have checked the cell number of each cluster in the input object. All the clusters have more then one cells. Is there any suggestion? Thanks very much.
I have tried to fixed the error, please try again. Thanks.
I have tried to fixed the error, please try again. Thanks.
Hi, shaoxin. I have updated the package and rerun the analysis after receiving your reply. But the same error came up again. So I checked the data another time to see if it was the cause of the error. And I found that there were indeed two clusters in one sample that contained only one cell each. The dataset contained scRNA-seqs from 4 samples, and the last time the cells counted for each cluster were in the whole dataset, without considering them in each sample. The error may be caused by this one-cell clusters. Sorry for the misleading information provided the last time.