This thread has a more searchable name, so I’m posting the answer here.
TL;DR
This issue, originating from imported particles using symbolic links in the job directory, has been resolved. The command:
csparc2star.py imported_particles.cs imported_particles.star --copy-micrograph-coordinates particles.star
will now behave as expected.
Full explanation
When you import particles to cryoSPARC, the stacks are symbolically linked in the job imported
directory. Therefore, when converting these particles back to .star, the rlnImageName
field points to those links, and not the original paths in the imported .star file. Merging of the original and converted files is based on matching rlnImageName
, leading to the error. (Note also that a copy of the imported file named particles.star is kept in the import job, this can come in handy).
The solution is to match based on the basename of the stacks instead of the entire path. I actually implemented this a long time ago, but only via star.py --copy-micrograph-coordinates
and only using the --augment
argument to add additional fields to the parsed .star file. I took this conservative approach in case people had multiple stacks with the same names but in different directories. I’m switching this in favor of a more useful default for most (non-insane) people. Someone in that situation will now have to add --noaugment
. This can additionally affect advanced merging using star.py --merge-key <a,b,c> --merge-fields <x,y,z> --merge-star <ptcls.star>
type commands, but I assume folks using this feature can figure it out, if they really need full path merging at all times.