Fundamental flaw on particle locations

Hi Cryosparc community

I was trying to transfer particle locations from cryosparc to relion and realized something is off with particle locations in cryosparc.

The particle coordinates on long axis of a K3 image is reported from 0 to 4092 and short axis is reported from 0 to 5760. I am not even sure how the particle extraction can work properly with this behaviour. Either, there is something fundamentally wrong here or I am making a bizarre mistake. Please let me know if you encountered this problem.

I imported motion corrected mrc micro-graphs to cryosparc. I am using v2.14.2. I initially picked particles with topaz and then manually picked particles to confirm this behavior.

To clarify, I manually picked particles close to edge along the long axis of the micrograph, X coordinate was constant and the Y coordinate was increasing from 0 upto 4092. I picked particles along the short axis and the Y coordinate was increasing from 0 to 5760 while the X coordinate was constant.

Hi @alburse,

Presuming you are using @DanielAsarnow’s great pyem tools for conversion?
Please check out this post for some discussion about x/y conventions.

Did you figure it out? --swapxy probably.

@apunjani and @DanielAsarnow, I think this is not about X,Y swap.
Let me show what I did to confirm the behavior I saw.

I manually picked particles along the long axis like below.

The particle coordinates spit out from this picking were (63, 200) - (250, 203) - (640, 201) - (1296, 208) - (2256, 203) - (3956, 248)

Then I manually picked particles along the short axis like below.

The particle coordinates spit out from this picking were (68, 203) - (69, 654) - (63, 1477) - (68, 2919) - (68, 5444).

This is not XY swap. the particle coordinate along the short axis increase from 203 to 5444 (so 0 to 5760, edge to edge). and the particle coordinates on the long axis increase from 63 to 3956 ( so 0 to 409, edge to edge). Is not this bizarre.

Did you try the argument? It’s not simply swapping the final coordinates. CS uses normalized coordinates, it changes what axis length is used when converting normalized coordinates to integer pixel coordinates.

Oh Thank you Daniel, that is unexpected. I will try it.

It seems to be working, thank you Daniel.
One note is --swapxy needs to be added after output.star

You can either have all the positional arguments (without and - or --, in my programs generally just the input and output files) at the beginning or the end. It’s usually a little bit easier to put them at the beginning and all the non-positional ones at the end IMO. What’s not allowed is mixing the order of the positional and non-positional arguments (just the way Python’s argparse works).

This makes sense. Thank you again