Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@

* `senkin_tmp_train`, `senkin_tmp_predict`: Store the model bundle (the test predictions, as the solution is transductive) as an h5ad file in a directory instead of a pickle. The train image is built from `nvidia/cuda` with the current pandas 3, the predict image `openproblems/base_pytorch_nvidia:1` ships pandas 2, and unpickling the bundled `var` DataFrame raised `NotImplementedError` in `NDArrayBacked.__setstate__`, so senkin_tmp finished both CITE training runs of run_2026-09-23 but never produced a prediction. The predict step still reads the old pickle until the test resources are regenerated (PR #73).

* `scipenn`: Exit 99 (non-applicable) instead of raising a `ValueError` on anything other than GEX -> ADT (PR #77).

# task_predict_modality 0.1.1

## NEW FUNCTIONALITY
Expand Down
1 change: 1 addition & 0 deletions src/methods/scipenn/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ arguments:
resources:
- type: python_script
path: script.py
- path: /src/utils/exit_codes.py
engines:
# sciPENN is installed --no-deps: it pins a spurious numba<=0.50.0 (never imported) and a
# 2021-era stack, but runs on the base image's torch/scanpy/anndata. The base already ships
Expand Down
10 changes: 7 additions & 3 deletions src/methods/scipenn/script.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import os
import sys
import tempfile

import anndata as ad
Expand All @@ -23,21 +24,24 @@
"batch_size": 128,
"seed": 0,
}
meta = {"name": "scipenn"}
meta = {"name": "scipenn", "resources_dir": "src/utils"}
## VIASH END

sys.path.append(meta["resources_dir"])
from exit_codes import exit_non_applicable

logger.info("Reading input files...")
rna_train = ad.read_h5ad(par["input_train_mod1"]) # mod1 = RNA (GEX)
prot_train = ad.read_h5ad(par["input_train_mod2"]) # mod2 = protein (ADT)
rna_test = ad.read_h5ad(par["input_test_mod1"])

# sciPENN only supports the GEX -> ADT direction. It biologically interprets the
# gene sets as RNA and the protein sets as surface protein, so running it on the
# swapped (ADT -> GEX) direction produces meaningless output. Fail loudly instead.
# swapped (ADT -> GEX) direction produces meaningless output.
mod1 = rna_train.uns.get("modality")
mod2 = prot_train.uns.get("modality")
if mod1 != "GEX" or mod2 != "ADT":
raise ValueError(
exit_non_applicable(
f"sciPENN only supports predicting protein (ADT) from RNA (GEX); "
f"got mod1={mod1!r}, mod2={mod2!r}."
)
Expand Down
Loading