Open wlason opened 1 day ago
I can confirm this was due to NAs in the cell annotation column.
I had to re-run the whole pipeline because the table in sdata .zarr became overwritten with 'annotation1' column and read_zarr_standardized
would throw an error. I could not rerun just the previous rule (aggregate
) to replace the obs in the .zarr file because the individual Baysor patches get deleted here:
https://github.com/gustaveroussy/sopa/blob/f1f5a99ee7f5a9489e511241a3a62bb520ec9860/workflow/Snakefile#L187
TLDR: make sure no NAs in the cell annotation column for TANGRAM.
Description
The tangram runs successfully with GPU acceleration, but it doesn't write out the sdata due to NA error.
...
Reproducing the issue
sopa annotate tangram path/to/sample.zarr --sc-reference-path "path/to/reference.h5ad" --cell-type-key "annotationl" --reference-preprocessing "log1p"
I am running this as part of Snakemake pipeline.I believe this is caused by an error here: https://github.com/gustaveroussy/sopa/blob/f1f5a99ee7f5a9489e511241a3a62bb520ec9860/sopa/cli/annotate.py#L73-L75
and I wonder if this may be because I (intentionally) have some NAs in the cell annotation column of my original h5ad? Could this be causing a problem, e.g. if the DataFrame is transposed and my NAs become column names? Perhaps this is wrong, but that was just my first idea!
If you could let me know how to troubleshoot this and how the tangram result is attempting to be saved, that would be super helpful!