Add reassign UIDs to particle sets tool


There is an option in Volume Alignment Tools to reassign UIDs for particles. This can be useful if one for example wants to compare the difference in centering between pairs of particles treated in different ways (or with different random seeds).

It would be useful I think if this was also available as an option in particle sets, so it could be easily applied to particles that have only been through 2D classification (e.g. to measure reproducibility of particle recentering during 2D classification of the same particle set).


Hi @olibclarke!

Could you help me understand the use case a bit more? If you’re comparing two treatments of the same particle, having the same UID is what you’d want, right?

Is this related to a symmetry-expansion-like workflow on something with non-crystallographic symmetry, where you

  1. Rotate and translate each of the N NCS-related monomers into the “consensus” pose
  2. Want each of those monomers to have their own UID?
1 Like

Hi Rich,

The use case is to take the same set of particles, run class2D twice, and identify particles that converged with ~identical shifts in both runs (to identify those that are consistently recentered).

I think if I put sets of particles which have identical UIDs into remove duplicates, they will just be merged, no? Or am I thinking about that wrong?

Apologies if I have it mixed up. In any case I was able to work around by just using volume alignment tools, but maybe that is unnecessary too! :slight_smile:


Ah, thanks for explaining!

You’re right that particles with the same UID will be “squashed” when input to e.g., a 2D Classification.

I’m sure you’ve thought of these things, but Remove Duplicates only considers the particle’s position in the micrograph, as determined by its fractional position from picking (location/center_{x,y}_frac) and the aligned shift (alignments{2,3}D/shift). Pose is ignored. Also, if the 2D class averages are slightly different (or merely offset slightly), it may be difficult to directly compare the absolute value of the shift between 2D Class runs.

In light of the above pitfalls, is there a reason to prefer this pipeline (Reassign UID → 2D Class → Remove Duplicates) to directly assessing the pose and shift of a particle (same UID between different jobs) using CryoSPARC tools? Aside, perhaps, from the obvious benefit of the former being all accessible from the GUI/workflows?


Mainly convenience, plus consistency between this job type and other job types which modify particle properties (e.g. volume alignment tools) and do have an option to reassign UIDs, but absolutely cryosparc-tools is another option.

For record keeping purposes I also prefer to stay in the GUI if I can, as the jobs created by cs-tools do not document or link the script used to create them.


1 Like

That all makes sense! Thanks for all the detail – we’ve recorded the feature request.

A note on record keeping: I’ve found it helpful to add messages to the log of cs-tools jobs. For example, if I’m using project.save_external_result():

external_uid = project.save_external_result(
    {...the usual...}

    "This job created with /u/rposert/notebooks/whatever.ipynb"

Thought I’d share the tip, but I can definitely understand the appeal of the convenient solution :slight_smile:

1 Like