Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SingleR() error #150

Open
Fathzadehm opened this issue Jan 3, 2022 · 2 comments
Open

SingleR() error #150

Fathzadehm opened this issue Jan 3, 2022 · 2 comments

Comments

@Fathzadehm
Copy link

Please post issues in https://github.com/LTLA/SingleR

Hi,

I am testing the SingleR on a pbmc dataset of ~13k cells. Here is the code with the following error:

Loading reference data with Ensembl annotations.

library(celldex)
ref.data <- HumanPrimaryCellAtlasData(ensembl=TRUE, cell.ont = "all")

Performing predictions.

library(SingleR)
predictions <- SingleR(test=pbmc, assay.type.test = 1, ref=ref.data, labels=ref.data$label.main)

Warning: The following arguments are not used: drop

Error in h(simpleError(msg, call)) :

error in evaluating the argument 'x' in selecting a method for function 'type': unused argument (drop = FALSE)

Error: no more error handlers available (recursive errors?); invoking 'abort' restart

I could not find the cause of this error. Thank you for being helpful.

@arglatha
Copy link

I am also getting this error, did you ever find a fix? Thanks!

@Camila-goclowski
Copy link

Camila-goclowski commented Dec 9, 2022

I was also running into this error and found that my issue was that I was inputting the entire reference object into the "ref" argument. I was able to overcome it by running GetAssayData on my reference AND test objects and used those outputs to then run SingleR. It would look something like this with your data:

test_assay <- GetAssayData(pbmc)
ref_assay <- GetAssayData(ref.data)

predictions <- SingleR(test = test_assay, ref = ref_assay, labels = ref.data$label.main)

The SingleR book also explained that by default it assumes the use of a bulkRNA-seq reference dataset. I am not sure how exactly this relates back to the error we were receiving, but I am guessing it is related. I also found that setting the de.method argument to "wilcox" as opposed to the default "classic" allowed the function to run smoothly (may have something to do with using an scRNA-seq reference as opposed to bulk I am guessing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants