FAQ¶
Error messages and their fixes are under Troubleshooting.
Do I need a GPU?¶
No. All ten methods run on a CPU. CellCharter, DeepST and SpatialDE2 can also use a GPU (GPU or CPU?).
My sample has no annotation. Can I still use kDomainBench?¶
Yes. Every method still returns its domains and its estimated k. Only the scores need an annotation. Your own data walks through it.
The methods give different k. Which one is right?¶
No single run tells you. The methods will disagree says how to read their estimates.
Does it work for mouse, or for another tissue?¶
Yes. No method takes the species or the tissue as a setting. Each reads only the count matrix and the spot coordinates of a 10x Visium sample. The results on this site are from human brain samples of one study.
Can I use Jupyter?¶
Yes, with the Python that has kdomainbench as the kernel. After an install
from the repository that is kdb_py. kdb_py has
no Jupyter server, so use the Jupyter of the Linux machine where the methods run (JupyterLab,
JupyterHub or Open OnDemand). Register kdb_py with it once, then pick it as the kernel:
For environments made with KDB_ENVS_DIR, name kdb_py by its path:
conda run -p /project/envs/kdb_py ....
When Jupyter does not see the R on your PATH, name it at the top of the notebook with
kdb.set_env("r", "/path/to/Rscript").
Can I score labels from another tool?¶
Yes. kdb.evaluate takes any labels indexed by spot barcode:
import pandas as pd
import kdomainbench as kdb
labels = pd.read_csv("my_labels.csv", index_col=0).iloc[:, 0] # barcode, label
kdb.evaluate(labels, "data/D3_151509_5k.h5ad")
n_spots_scored in the result must equal your number of spots. A smaller number means that
some barcodes did not match.
To list these labels in the summary table next to the ten methods, save them as a run folder
under the results folder: kdb_results/MyTool/D3_151509_5k_cpu/cluster_results.csv with the
columns spot_id,cluster, and beside it a run_info.json with four fields:
A relative h5ad path is read from the folder you work in.
Can I add a method?¶
Yes, as a script and one entry in the package. Contributing says what the script receives and must write.
How do I run on a cluster?¶
Run on a cluster installs the environments in a project folder and submits one job per method.