SingleR-inc / SingleR

Clone of the Bioconductor repository for the SingleR package.
https://bioconductor.org/packages/devel/bioc/html/SingleR.html
GNU General Public License v3.0
177 stars 19 forks source link

Error in `[<-`(`*tmp*`, , u, value = rowMedians(DelayedArray(mat), cols = u == : subscript out of bounds #182

Closed xujingmei111 closed 3 years ago

xujingmei111 commented 3 years ago

command: pred <- SingleR(test=test_data, ref=refdata, labels=as.character(main_label))

then get the error: Error in [<-(*tmp*, , u, value = rowMedians(DelayedArray(mat), cols = u == : subscript out of bounds

when: pred <- SingleR(test=test_data, ref=refdata, labels=as.character(main_label),de.method="wilcox") Error in all.n[[b]][[target]] : subscript out of bounds

What's the problem?How can I fix it ?

LTLA commented 3 years ago

¯\_(ツ)_/¯

Can you make a minimal reproducible example? Can you show your session information?

If you can't, I can only supply guesses. Check that test_data is a matrix, sparse matrix, or DelayedMatrix. Same for refdata. make sure that main_label doesn't have any weird stuff in it, e.g., no NAs or weird unicode characters.

xujingmei111 commented 3 years ago

¯_(ツ)_/¯

Can you make a minimal reproducible example? Can you show your session information?

If you can't, I can only supply guesses. Check that test_data is a matrix, sparse matrix, or DelayedMatrix. Same for refdata. make sure that main_label doesn't have any weird stuff in it, e.g., no NAs or weird unicode characters.

Yes,you're right! You made my day! The main_lable contains Null and "II" which were neglected before , it worked after I have fixed it ! Thanks so much!