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
173 stars 19 forks source link

error in load reference data set #134

Closed Shiywa closed 4 years ago

Shiywa commented 4 years ago

HI, when I load the reference data set, I got following error information:

> hpca.se <- HumanPrimaryCellAtlasData()
snapshotDate(): 2019-04-29
Error in .local(x, i, j, ...) : 'i' must be length 1

I tried all reference data set and got the same error.

my SingleR information : version = "1.0.6"

my R version is 3.6.1.

what's wrong with it ?

LTLA commented 4 years ago

I can't reproduce your error. Runs perfectly fine on my copy of R 3.6.1 with SingleR 1.0.6.

However, the ExperimentHub snapshot date for Bioconductor 3.10 should be 2019-10-22. Your snapshot date is 6 months behind, which suggests to me that you're mixing and matching Bioconductor packages across different releases. In fact, SingleR didn't even exist in Bioconductor during the Bioconductor 3.9 release (corresponding to 2019-04-29) so it's hardly a surprise that you can't pull any SingleR-related datasets out of the ExperimentHub snapshot at that point in time!

If you want to use SingleR 1.0.6, you'll have to upgrade the other packages to Bioconductor 3.10. But honestly, if you're going to spend time updating stuff, you might as well drag yourself to the latest release. Older versions are frozen for posterity so bugfixes will only go into the latest version.

Shiywa commented 4 years ago

thanks for your suggestion. at first, I really don't want to reinstall the new bioconductor, meaning that I have to reinstall my R. I will restart with a new R

LTLA commented 4 years ago

If you must use your old R 3.6.1, you can, but you can't use SingleR 1.0.6 with Bioconductor 3.9. SingleR didn't even exist in Bioconductor 3.9. You'll have to at least upgrade to Bioconductor 3.10.

Shiywa commented 4 years ago

I found that my bioconductor version are 3.9 and I installed the dependence like :

> BiocManager::install("ExperimentHub")
Bioconductor version 3.9 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'ExperimentHub'
also installing the dependencies ‘interactiveDisplayBase’, ‘dbplyr’, ‘AnnotationHub’, ‘BiocFileCache’

but I installed specific version SingleR by downloading source code from https://www.bioconductor.org/packages/3.10/bioc/html/SingleR.html and installing this file. I found that this version adjust for R 3.6.

is there any error in it ?

LTLA commented 4 years ago

The better approach would be to do:

BiocManager::install("SingleR", version="3.10")

... which would also force all other Bioconductor packages to update to Bioconductor version 3.10. Otherwise you're asking SingleR from Bioconductor 3.10 to play nice with ExperimentHub from Bioconductor 3.9, and the latter doesn't even know about the former, so obviously any attempt to download data will fail.