theislab / zellkonverter

Conversion between scRNA-seq objects
https://theislab.github.io/zellkonverter/
Other
145 stars 27 forks source link

Use example_anndata.h5ad for tests/examples #27

Open lazappi opened 3 years ago

lazappi commented 3 years ago

This file is more complete than the krumsiek11.h5ad file currently used and should be a better test of a standard conversion.

The file is slightly large (~1.2 MB) so might be worth zipping it (zipped size is ~300 kB). If that is done need to do something like this before trying to read it in:

tmp <- tempdir()
zip.file <- system.file("extdata", "example_anndata.h5ad.zip", package = "zellkonverter")
unzip(zip.file, exdir = tmp)
file <- file.path(tmp, "example_anndata.h5ad")

Ideally this would be wrapped in a function so you can just do:

file <- getExamplePath()
LTLA commented 3 years ago

Could just stick it on ExperimentHub and have zellkonverter Suggests EHub to pull it down. In fact, with this approach, you could put any number of arbitrarily large files and then make longtests to check that they are correctly converted; see DropletUtils and its relationship with the DropletTestFiles package.

lazappi commented 3 years ago

Ah, yes. I knew you suggested something like that but I couldn't remember what. Thanks for the reminder!

Do you think 1.2MB is big enough to worry about or should I just leave this for bigger test datasets?

LTLA commented 3 years ago

IMO I wouldn't think of it as a "worry", more of an investment for the future. Once paid, you have the process to just easily whack on more files to, e.g., check behavior with updates or new versions of the format. It's probably a good time to get any EHub teething problems out of the way, given that nothing in devel is critically broken.