Request: More tools for handling UIDs

Hi All,

It would be great to have more options integrated in cryosparc for removing or preventing the addition of UIDs.

I currently have a scenario where imported particles are accumulating a second UID in the micrograph path. In this case, --strip-uid removes both UIDs preventing --copy-micrograph-coordinates from working.


Original star file path = Extract/job147/J902/motioncorrected/000009858663425993277_FoilHole_16063338_Data_1606516
0_16065161_20210616_1641-91434_patch_aligned_doseweighted.mrcs path = Extract/job147/J902/motioncorrected/010111053032402395369_000009858663425993277_FoilHole_16063338_Data_16065160_16065161_20210616_1641-91434_patch_aligned_doseweighted.mrcs

I noticed after the fact that particle import has the option to remove_leading_uid but it’s unclear if this will remove the first UID or prevent the second one from being added.

Sorry to bring this up again but the UID’s are a source of continual frustration.



I was actually one step ahead this time*! If you pass a positive number to --strip-uid it removes that number of UIDs starting from the left side (i.e. it deletes the newer ones first). The argument has a default of -1 indicating removal of all UIDs.

*I admit it was never documented.


Nice, thank you! :sunglasses:

I begrudgingly figured it out with sed but this will be helpful in the future!

I’ll add a note about the feature to the help text. If you don’t mind could you double check that it would have worked for you?

I can confirm particles_selected.cs --strip-uid 1 produces this path:


instead of:


Thank you again for the fix!

Until next time :upside_down_face:


This option would remove the first UID.