diff --git a/CHANGELOG.md b/CHANGELOG.md index 039f910f..10ec97c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ * `lm`: Drop the unused `n_cores` and ask for `lowcpu` rather than `highcpu`. The per-gene loop is `pbapply::pblapply()` without a cluster, so it has always run on one core (PR #42). +* `novel_train`: Store only the metadata `novel_predict` needs in the model artifact, instead of a full copy of `train_mod2` (PR #47). + ## BUG FIXES * `process_dataset`: Fall back to holding out a quarter of the batches when the dataset has no `obs["is_train"]`, rather than silently producing four empty h5ads. `obs["is_train"]` carries the NeurIPS 2021 competition split and stays optional; `obs["cell_type"]` is now declared and required (PR #28). diff --git a/src/methods/novel/novel_train/script.py b/src/methods/novel/novel_train/script.py index bf3a2910..64daf192 100644 --- a/src/methods/novel/novel_train/script.py +++ b/src/methods/novel/novel_train/script.py @@ -39,7 +39,8 @@ input_train_mod1 = ad.read_h5ad(par['input_train_mod1']) input_train_mod2 = ad.read_h5ad(par['input_train_mod2']) -adata = input_train_mod2.copy() +# carries the metadata novel_predict needs; the matrix itself is not used there +adata = ad.AnnData(uns=dict(input_train_mod2.uns)) mod1 = input_train_mod1.uns['modality'] mod2 = input_train_mod2.uns['modality']