Spatula requires the input transcript.tsv and the output pixel.sorted.tsv.gz to be sorted by the same axis (link)
The input is NOT sorted by the format_xenium.py in picture.
Add a step to sort the transcript.csv by the X column before passing it to ficture.