chore: clarify that no I/o is needed for add_adatas#182
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #182 +/- ##
==========================================
- Coverage 93.19% 91.20% -1.99%
==========================================
Files 14 14
Lines 1058 1058
==========================================
- Hits 986 965 -21
- Misses 72 93 +21
🚀 New features to boost your workflow:
|
|
ping @felix0097 |
|
A summary of the discussion points I had earlier: The use case with the def load_adata(path):
adata = ad.experimental.load_lazy(path)
adata = some_preprocessing(adata)
return adatathis can also be expanded to custom preprocessing logic per path argument, e.g like this load_fct_dict = {path: custom_load_fct, ....}
def load_adata(path):
adata = ad.experimental.load_lazy(path)
adata =load_fct_dict[path](adata)
return adataIn general, if people subset the var or obs space in the pre-processing, your size estimates for the dataset shard size and zarr shard size will be off. We could add check when writing the data to disk to see if we're off by a factor of e.g >2. And then yield a user warning, saying they could adjust the Also, as our size estimation logic depends on actually being able to access the on disk data. We should add checks that supplying non existing paths raises an error, e.g. this would be disallowed: collection.add_adatas(["preprocessed_by_felix"], load_adata=load_adata_by_path, ...) |
This just popped into my head but people don't really need to create stores all at once in pipelining.
Something like:
is probably a pretty common use-case, especially if people don't know about
anndata.concatlazy.