Reassign Particles - Reprocessed Micrographs

Dear cryoSPARC Team,

I am facing an issue with the “Reassing Particles To Micrographs” job.

Having processed my dataset to a point where I obtained a final map, I realized that there was an artefact during motion correction. Thus I reprocessed my micrographs.

I wanted to now re-extract my particles from the newly processed micrographs, but I cannot manage to match the micrographs correctly. If I do not remove the UIDs or any pre- or suffix, I get this source and query string:

  Example source micrograph filename: 009007457736468012323_FoilHole_30673810_Data_30667542_4_20250731_045256_Fractions_patch_aligned_doseweighted.mrc
  Example query micrograph filename:   000002951672975848891_FoilHole_30670809_Data_30667835_19_20250730_211756_Fractions_patch_aligned_doseweighted.mrc

If I remove the UIDs, I get this output but it still fails to match the strings:

Example source micrograph filename: FoilHole_30673810_Data_30667542_4_20250731_045256_Fractions_patch_aligned_doseweighted.mrc
Example query micrograph filename: FoilHole_30666532_Data_30667542_4_20250730_144854_Fractions_patch_aligned_doseweighted.mrc

I understand that both of the strings are different (e.g.: looking at the date 20250730). The unique naming of my raw data is the following string:

30666532_Data_30667542_4_20250730_144854

But even if I trim the strings further, removing “FoilHole_” and “Fractions_*”, the matching does not seem to work.

If i reduce the query to the matching string:

30667542_4

Then the job runs successfully, but there are only a few micrographs that are overloaded with particles, and most of the micrographs are empty.

Could anyone help me to pin point which part of the string is required to successfully run the job?

All the best,

Tamino

@Tamino Please can you post the outputs of these commands

csprojectid=P99 # replace with actual project ID
csjobid=J199 # replace with ID of Reassign Particles job
cryosparcm cli "get_job('$csprojectid', '$csjobid', 'job_type', 'version', 'instance_information', 'status',  'params_spec', 'errors_run', 'input_slot_groups')"
cryosparcm eventlog $csprojectid $csjobid | tail -n 40

and confirm that exposures corresponding to all the particle inputs have been connected.

Dear @wtempel

Thank you so much for taking your time and going through this with me:

csprojectid=P31
csjobid=J1238

~$ cryosparcm cli "get_job('$csprojectid', '$csjobid', 'job_type', 'version', 'instance_information', 'status',  'params_spec', 'errors_run', 'input_slot_groups')"
{'_id': '68e26e0119431a15beaa6730', 'errors_run': [{'message': 'Could not find match for FoilHole_30666589_Data_30667542_20_20250730_155911_Fractions_patch_aligned_doseweighted.mrc', 'warning': False}], 'input_slot_groups': [{'connections': [{'group_name': 'particles', 'job_uid': 'J1102', 'slots': [{'group_name': 'particles', 'job_uid': 'J1102', 'result_name': 'location', 'result_type': 'particle.location', 'slot_name': 'location', 'version': 'F'}, {'group_name': 'particles', 'job_uid': 'J1102', 'result_name': 'ctf', 'result_type': 'particle.ctf', 'slot_name': 'ctf', 'version': 'F'}, {'group_name': 'particles', 'job_uid': 'J1102', 'result_name': 'alignments3D', 'result_type': 'particle.alignments3D', 'slot_name': None, 'version': 'F'}, {'group_name': 'particles', 'job_uid': 'J1102', 'result_name': 'blob', 'result_type': 'particle.blob', 'slot_name': None, 'version': 'F'}, {'group_name': 'particles', 'job_uid': 'J1102', 'result_name': 'alignments2D', 'result_type': 'particle.alignments2D', 'slot_name': None, 'version': 'F'}, {'group_name': 'particles', 'job_uid': 'J1102', 'result_name': 'pick_stats', 'result_type': 'particle.pick_stats', 'slot_name': None, 'version': 'F'}, {'group_name': 'particles', 'job_uid': 'J1102', 'result_name': 'ml_properties', 'result_type': 'particle.ml_properties', 'slot_name': None, 'version': 'F'}]}], 'count_max': inf, 'count_min': 1, 'description': 'Particles to reassign UIDs for', 'name': 'particles', 'repeat_allowed': False, 'slots': [{'description': '', 'name': 'location', 'optional': False, 'title': 'Particle location data', 'type': 'particle.location'}, {'description': '', 'name': 'ctf', 'optional': True, 'title': 'Particle CTF data', 'type': 'particle.ctf'}], 'title': 'Particles', 'type': 'particle'}, {'connections': [{'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'slots': [{'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'micrograph_blob', 'result_type': 'exposure.micrograph_blob', 'slot_name': 'micrograph_blob', 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'mscope_params', 'result_type': 'exposure.mscope_params', 'slot_name': 'mscope_params', 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'ctf', 'result_type': 'exposure.ctf', 'slot_name': 'ctf', 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'movie_blob', 'result_type': 'exposure.movie_blob', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'background_blob', 'result_type': 'exposure.stat_blob', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'micrograph_thumbnail_blob_1x', 'result_type': 'exposure.thumbnail_blob', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'micrograph_thumbnail_blob_2x', 'result_type': 'exposure.thumbnail_blob', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'ctf_stats', 'result_type': 'exposure.ctf_stats', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'rigid_motion', 'result_type': 'exposure.motion', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'spline_motion', 'result_type': 'exposure.motion', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'micrograph_blob_non_dw', 'result_type': 'exposure.micrograph_blob', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'micrograph_blob_non_dw_AB', 'result_type': 'exposure.micrograph_blob', 'slot_name': None, 'version': 'F'}, {'group_name': 'exposures_accepted', 'job_uid': 'J1175', 'result_name': 'gain_ref_blob', 'result_type': 'exposure.gain_ref_blob', 'slot_name': None, 'version': 'F'}]}], 'count_max': inf, 'count_min': 1, 'description': 'Micrographs to reassign particles to', 'name': 'exposure', 'repeat_allowed': False, 'slots': [{'description': '', 'name': 'micrograph_blob', 'optional': False, 'title': 'Exposure micrograph blob', 'type': 'exposure.micrograph_blob'}, {'description': '', 'name': 'mscope_params', 'optional': True, 'title': 'Exposure mscope_params data', 'type': 'exposure.mscope_params'}, {'description': '', 'name': 'ctf', 'optional': True, 'title': 'Exposure CTF data', 'type': 'exposure.ctf'}], 'title': 'Exposures', 'type': 'exposure'}], 'instance_information': {'available_memory': '552.32GB', 'cpu_model': 'AMD EPYC 9354P 32-Core Processor', 'ofd_hard_limit': 1048576, 'ofd_soft_limit': 1024, 'physical_cores': 32, 'platform_architecture': 'x86_64', 'platform_node': 'mars', 'platform_release': '6.8.0-78-generic', 'platform_version': '#78-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 12 11:34:18 UTC 2025', 'total_memory': '566.60GB', 'used_memory': '10.12GB'}, 'job_type': 'reassign_particles_mics', 'params_spec': {}, 'project_uid': 'P31', 'status': 'failed', 'uid': 'J1238', 'version': 'v4.7.1-cuda12+250814'}

cryosparcm eventlog $csprojectid $csjobid | tail -n 40
[Sun, 05 Oct 2025 13:09:27 GMT]  License is valid.
[Sun, 05 Oct 2025 13:09:27 GMT]  Launching job on lane default target localhost ...
[Sun, 05 Oct 2025 13:09:27 GMT]  Running job on remote worker node hostname localhost
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB] Job J1238 Started
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB] Master running v4.7.1-cuda12+250814, worker running v4.7.1-cuda12+250814
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB] Working in directory: /mnt/uranus/26A_F2/20250730_CR_process/CS-20250730-cr-process/J1238
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB] Running on lane default
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB] Resources allocated:
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB]   Worker:  localhost
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB]   CPU   :  [0]
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB]   GPU   :  []
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB]   RAM   :  []
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB]   SSD   :  False
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB] --------------------------------------------------------------
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 91 MB] Importing job module for job type reassign_particles_mics...
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 94 MB] Job ready to run
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 94 MB] ***************************************************************
[Sun, 05 Oct 2025 13:09:29 GMT] [CPU RAM used: 122 MB] Loaded particle stack with 44040 items
[Sun, 05 Oct 2025 13:09:30 GMT] [CPU RAM used: 126 MB] Loaded 10667 micrographs
[Sun, 05 Oct 2025 13:09:30 GMT] [CPU RAM used: 129 MB]   Example source micrograph filename:
[Sun, 05 Oct 2025 13:09:30 GMT] [CPU RAM used: 129 MB]      FoilHole_30673810_Data_30667542_4_20250731_045256_Fractions_patch_aligned_doseweighted.mrc
[Sun, 05 Oct 2025 13:09:30 GMT] [CPU RAM used: 129 MB]   Example query micrograph filename:
[Sun, 05 Oct 2025 13:09:30 GMT] [CPU RAM used: 129 MB]      FoilHole_30666532_Data_30667542_4_20250730_144854_Fractions_patch_aligned_doseweighted.mrc
[Sun, 05 Oct 2025 13:09:30 GMT] [CPU RAM used: 129 MB] Traceback (most recent call last):
  File "cryosparc_master/cryosparc_compute/run.py", line 129, in cryosparc_master.cryosparc_compute.run.main
  File "/home/cryosparcuser/cryosparc/cryosparc_worker/cryosparc_compute/jobs/utilities/run_reassign_particles_mics.py", line 71, in run_reassign_particles_mics
    assert qname in inv_index_source, "Could not find match for %s" % qname
AssertionError: Could not find match for FoilHole_30666589_Data_30667542_20_20250730_155911_Fractions_patch_aligned_doseweighted.mrc

Just that I am not confused about the inputs as described here (Job: Reassign Particles to Micrographs | CryoSPARC Guide).

The particle input should be the particle stack from my refinement done with the old micrographs. My micrograph input is the new set of micrographs. I did already do exposure curation, and I end up with a different amount of micrographs for my newly processed movies compared to the old micrographs. Does this influence the error?

Best,
Tamino

Dear @wtempel,

I checked again with the “curate exposures job” if the name scheme matches for my micrographs.
Below you can find the name of the same micrograph for the first and second preprocessing.

First preprocessing
012016103854893193019_FoilHole_30675391_Data_30667844_4_20250731_044200_Fractions_patch_aligned_doseweighted.mrc

Second preprocessing
007846497889931538534_FoilHole_30675391_Data_30667844_4_20250731_044200_Fractions_patch_aligned_doseweighted.mrc

So the query I would want to have in my job should be the following (basically just removing the UID’s?):
FoilHole_30675391_Data_30667844_4_20250731_044200

But somehow I cannot get the reassignment of the micrographs to work! Maybe one more thing. For the second processing, I imported the movies again - and this importing path is not the same in the two instances. I copied it from two different harddrives.

Thank you for you help!

best,
Tamino

Hi @Tamino,

What was the issue with preprocessing that prompted you to reprocess the data?

Additionally, can you send over (A) the job_log(s) for the reassign jobs that are not working properly and (B) a screenshot of the tree view showing the processing jobs upstream of the re-assign particles job?

Thanks,

Kye

Dear @kstachowski,

thank you for taking your time to reply.

In the mean time I have started reprocessing the with picking the particles again. Thus it is not time sensitive to find the problem, but it would be nice to know a solution for the next time.
I started reprocessing the micrographs again, because there was an issue with motion correction falcon 4 detector micrographs, the solution was found here:

I will provide you with A)
================= CRYOSPARCW ======= 2025-10-05 15:09:28.611955 =========
Project P31 Job J1238
Master mars Port 42002

MAIN PROCESS PID 2726920
========= now starting main process at 2025-10-05 15:09:28.612750
MONITOR PROCESS PID 2726922
========= monitor process now waiting for main process
========= sending heartbeat at 2025-10-05 15:09:29.268678
utilities.run_reassign_particles_mics cryosparc_compute.jobs.jobregister


Transparent hugepages setting: always [madvise] never

**** handle exception rc
Traceback (most recent call last):
File “cryosparc_master/cryosparc_compute/run.py”, line 129, in cryosparc_master.cryosparc_compute.run.main
File “/home/cryosparcuser/cryosparc/cryosparc_worker/cryosparc_compute/jobs/utilities/run_reassign_particles_mics.py”, line 71, in run_reassign_particles_mic
s
assert qname in inv_index_source, “Could not find match for %s” % qname
AssertionError: Could not find match for FoilHole_30666589_Data_30667542_20_20250730_155911_Fractions_patch_aligned_doseweighted.mrc
set status to failed
========= main process now complete at 2025-10-05 15:09:39.285210.
========= monitor process now complete at 2025-10-05 15:09:39.290159.

Ill will provide you B) (tree view was too crowded)

Hi @Tamino,

If you need to re-do motion correction to remove start/end frames, its possible to do so by cloning the first motion correction job and changing the needed parameters. This will alleviate the need to use Reassign Particles to Micrographs.

Additionally, if you supply as inputs your particle stack and the outputted micrographs from J1173, does the Reassign Particles job work?

Best,

Kye