Note on csparc2star.py and particle coordinates

Hi all,
Quick update on converting particle coordinates.

As --swapxy was always needed for correct coordinate output, it is now the default. If you pass the argument, you will be reminded that it is no longer needed. This change will make converting less tiresome and also less prone to user error. In the very unlikely event you need to unswap the axes, you can use --noswapxy.

Further, there was a logic error in --inverty that could make the argument have no effect. This has been addressed. I have also determined that --inverty is necessary only when applying coordinates obtained after Patch Motion to micrographs produced by Relion or Motioncor2 (or, I assume, WARP), because Patch Motion physically flips the images relative to what is shown in SerialEM / Digital Micrograph. The same effect can be obtained using Invert Y from the Extract Particles options. (For example, if you forgot --inverty and are extracting the Motioncor2 images in cryoSPARC again).

I apologize if this changes how you have to call csparc2star.py - but then I would also ask, why are you rotating your micrographs 90˚ after motion correction?

More details are given in a github issue and as comments in the conversion code.

4 Likes

Hi Daniel, thank you for the update.

I have also determined that --inverty is necessary only when applying coordinates obtained after Patch Motion to micrographs produced by Relion or Motioncor2 (or, I assume, WARP), because Patch Motion physically flips the images relative to what is shown in SerialEM / Digital Micrograph.

Just to clarify the use-case for --inverty, I was previously under the impression that --inverty was required specifically when starting from .tif moviestacks due to the way cryoSPARC reads the data on-disk.

Am I right in assuming that with the updated logic, --inverty is required regardless of input movie format, e.g. .mrc or .eer?

Cheers,
Yang

Ah, I have no idea, I didn’t test MRC movies or movies produced by other software than SerialEM w/ K3 plugin. If you have some, would you mind testing? The new disparticle.py program in pyem makes it very easy to check.

Thank you. We will do a quick test the next time an appropriate dataset presents itself. In the mean time, it is reassuring that your description of --inverty appears consistent with our past experience.