-
Notifications
You must be signed in to change notification settings - Fork 33
Change how pbmc_small is stored and generated
#188
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
base: develop
Are you sure you want to change the base?
Conversation
Change `pbmc_small` from a binary Rda file to an R script. This change
- provides a record of how `pbmc_small` is generated
- provides the raw MTX for `pbmc_small`
- ensures that `pbmc_small` is always up-to-date
Despite moving to an R script, `pbmc_small` will continue to be bundled
and distributed as a binary Rda file; `R CMD build` will resave the R
script to an Rda file and remove the R script for package distribution
The biggest drawback is `devtools::load_all(); data("pbmc_small")` no
longer works, due to differences in `devtools::load_all()` and `R CMD
build`; to get around this, I've provided an internal `.PBMCsmall()`
function that will load `pbmc_small` from the R script
```R
.PBMCsmall()
```
As this results in always re-building `pbmc_small`, one can pass `mode =
"resave"` to save `pbmc_small` as an Rda file for reuse with `load()`
```R
.PBMCsmall(mode = "resave")
```
There are also a couple of other changes to enable this functionality,
namely:
- caching SeuratObject version at load-time
- minor update in backwards compatibility compliance checking
- new helper function to find R package version without using
`utils::packageVersion()`
|
I finally got a chance to test this out properly — I think this is a great change!! 🙌 It appears that this well require us to add a call to On a related note, any ideas why this update would cause some of the tests under seurat/tests/testthat/test_differential_expression.R to start failing? |
Change
pbmc_smallfrom a binary Rda file to an R script. This changepbmc_smallis generatedpbmc_smallpbmc_smallis always up-to-dateThis change also adds a v5 assay to
pbmc_smallcalledRNA5alongside the existing v3RNAassay for testing and demonstration purposesDespite moving to an R script,
pbmc_smallwill continue to be bundled and distributed as a binary Rda file;R CMD buildwill resave the R script to an Rda file and remove the R script for package distributionThe biggest drawback is
devtools::load_all(); data("pbmc_small")no longer works, due to differences indevtools::load_all()andR CMD build; to get around this, I've provided an internal.PBMCsmall()function that will loadpbmc_smallfrom the R script# re-build `pbmc_small` and save in global environment .PBMCsmall()As this results in always re-building
pbmc_small, one can passmode = "resave"to savepbmc_smallas an Rda file for reuse withload()There are also a couple of other changes to enable this functionality, namely:
utils::packageVersion()