Hi, I want to re-extract particle with different patch motion output (same dataset, but different motion correction option). Use https://discuss.cryosparc.com/t/extract-particles-from-different-patch-motion-outputs/5802 this link as reference, I use following code to in CLI mode of Cryosparc.
from cryosparc_compute.dataset import Dataset
micrographs_path = '/home/cs/P4/P4/J1016/micrographs_rigid_aligned.cs'
exported_particles_path = '/home/cs/P4/P4/exports/jobs/J1167_manual_picker_v2/J1167_particles/J1167_particles_exported.cs'
micrographs = Dataset.load(micrographs_path)
particles = Dataset.load(exported_particles_path)
mic_uid_to_path = dict(zip(micrographs['uid'], micrographs['micrograph_blob/path']))
for particle in particles.rows():
particle['location/micrograph_path'] = mic_uid_to_path[particle['location/micrograph_uid']]
particles.to_file(exported_particles_path)
I made substitution from original one in link following instruction of Cryosparc CLI mode because of NotImplementedError
and I finally faced this error
KeyError Traceback (most recent call last)
in <cell line: 7>()
6 mic_uid_to_path = dict(zip(micrographs[‘uid’], micrographs[‘micrograph_blob/path’]))
7 for particle in particles.rows():
----> 8 particle[‘location/micrograph_path’] = mic_uid_to_path[particle[‘location/micrograph_uid’]]
9 particles.to_file(exported_particles_path)
KeyError: 13606637446806277392
Please give me any suggestions to solve this error.
Thank you for your help.
Bong Heon Kim