Skip to content

Commit e2bc9de

Browse files
committed
Improve logging and docs
1 parent ed80667 commit e2bc9de

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

3.83 KB
Binary file not shown.

src/methods/cellmapper_scvi/config.vsh.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ label: CellMapper+scVI
44
summary: "Modality prediction in an scVI latent space using CellMapper"
55
description: |
66
CellMapper is a general framework for k-NN based mapping tasks in single-cell and spatial genomics.
7-
This variant uses CellMapper to project modalities from a reference dataset (train) onto a query dataset (test) in an scVI latent space.
7+
This variant uses CellMapper to project modalities from a reference dataset (train) onto a query dataset
8+
(test) in a modality-specific latent space computed with suitable scvi-tools models. For gene expression data,
9+
we use the scVI model on raw counts (nb likelihood), for ADT data, we use the scVI models on normalized counts
10+
(gaussian likelihood), and for ATAC data, we use the PeakVI model on raw counts. The actual CellMapper pipeline is
11+
modality-agnostic.
812
references:
913
doi:
1014
- 10.5281/zenodo.15683594

src/methods/cellmapper_scvi/script.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
# Note: this section is auto-generated by viash at runtime. To edit it, make changes
88
# in config.vsh.yaml and then run `viash config inject config.vsh.yaml`.
99
par = {
10-
'input_train_mod1': 'resources_test/task_predict_modality/openproblems_neurips2021/bmmc_cite/swap/train_mod1.h5ad',
11-
'input_train_mod2': 'resources_test/task_predict_modality/openproblems_neurips2021/bmmc_cite/swap/train_mod2.h5ad',
12-
'input_test_mod1': 'resources_test/task_predict_modality/openproblems_neurips2021/bmmc_cite/swap/test_mod1.h5ad',
10+
'input_train_mod1': 'resources_test/task_predict_modality/openproblems_neurips2021/bmmc_multiome/normal/train_mod1.h5ad',
11+
'input_train_mod2': 'resources_test/task_predict_modality/openproblems_neurips2021/bmmc_multiome/normal/train_mod2.h5ad',
12+
'input_test_mod1': 'resources_test/task_predict_modality/openproblems_neurips2021/bmmc_multiome/normal/test_mod1.h5ad',
1313
'output': 'output.h5ad',
1414
'n_neighbors': 30,
1515
'kernel_method': 'hnoca',
16-
'use_hvg': False,
16+
'use_hvg': True,
1717

1818
}
1919
meta = {

src/methods/cellmapper_scvi/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ def get_representation(adata: ad.AnnData, modality: Literal["GEX", "ADT", "ATAC"
5454
raise ValueError(f"Unknown modality: {modality}")
5555

5656
example_data = adata.layers[layer].data if issparse(adata.layers[layer]) else adata.layers[layer]
57-
print(f"Set up AnnData for modality: {modality}, layer={layer}", flush=True)
57+
print(f"Set up AnnData for modality: '{modality}' using layer: '{layer}'", flush=True)
5858
print(f"Data looks like this: {example_data}", flush=True)
59+
print(model, flush=True)
5960

6061
# Train the model
6162
model.train(early_stopping=True)

0 commit comments

Comments
 (0)