Troubleshooting prepare()#
Audience: everyone
Time: look up your message
Goal: symptom → cause → fix for every refusal prepare() makes
Every input is checked before anything is written, so a refusal leaves nothing on disk. The message names the argument, what was found, and usually the fix.
The output path#
Message |
Cause and fix |
|---|---|
|
|
|
Pass one of the four exactly, in lower case. |
|
|
|
Pass |
|
A |
|
A folder sits where the file would go; remove it yourself. |
|
Drop |
Identity and text#
Message |
Cause and fix |
|---|---|
|
Use letters, digits, |
|
Remove leading/trailing spaces or invisible characters from the text named. |
|
A link needs its text. |
|
Use a full |
Shapes and values#
Message |
Cause and fix |
|---|---|
|
Inputs come from different cell sets or orders; take every array from one AnnData. |
|
Pass cells × genes ( |
|
Remove or replace the NaN/infinite values at the positions named, or cast values beyond float32’s range. |
|
Replace infinities with NaN, which is stored as missing. |
|
|
|
Convert it, e.g. |
Names and keys#
Message |
Cause and fix |
|---|---|
|
Rename the key or column; see the path rules in Input requirements (global). |
|
Two keys would be one folder on macOS and Windows; rename one. |
|
Rename the column. |
|
|
|
Give |
|
Pass |
|
Identifiers match the viewer’s gene names ( |
The graph and vector fields#
Message |
Cause and fix |
|---|---|
|
A directed graph (Seurat’s |
|
Pass connectivities, not signed or distance-like values. |
|
Name the embedding |
|
Pass an array exactly as wide as its embedding. |
|
Another embedding’s longer basis claims the key (here |
|
Use the field name you passed ( |
Launch defaults#
Message |
Cause and fix |
|---|---|
|
Pass that array in |
|
Pass the latent space in |
|
Name existing |
|
Name an existing |
data= and MuData#
Message |
Cause and fix |
|---|---|
|
Pass the object, or its parts as |
|
The object does not name itself; pass |
|
Compute one ( |
|
|
|
Prepare each modality as an AnnData: |
|
|
|
|
|
Give it one: |
|
Compute one in a modality or at the root, or pass |
|
Change the modality first: |
|
Name one of |
|
With an AnnData, leave |
|
Name modalities of |
|
Name a root embedding, or one of a modality that measured every cell. |
All of it, with examples: Prepare an AnnData or a MuData whole (data=).
The file opens but looks wrong#
The wrong embedding opens first: set
embedding_defaults(Embeddings and coordinates).Gene search shows ids instead of symbols: set
var_gene_id_column(var (gene metadata) and gene names).No velocity overlay: the view must show the embedding the field was written for (
velocityonX_umapisobsm['velocity_umap'], drawn overX_umap). Anobsm['velocity_umap_2d']written by hand beside a bareX_umap(noX_umap_2d) no longer binds: name itvelocity_umap, scVelo’s own name, or pass it throughvector_fields={"velocity": {"X_umap": v}}.Slow over the internet: host an
.h5ador.zarr.ziprather than a.zarrfolder (Performance and storage).
For loading problems after the file is written, see Troubleshooting (viewing).
The same page for R, cellucid_prepare(): Troubleshooting cellucid_prepare().