Hello.
I’m trying to import particles picked using crYOLO into cryoSPARC. But there is an error message; “Could not import star file: too many fields missing.” The details are explained below. I would appreciate to let me know how to fix it.
The original imported micrographs name and files used for cryolo picking differ by “_patch_aligned_doseweighted” which is 27 characters in length. These to be truncated from the end of the base name.
I was trying to remove unwanted name part by sed also.
sed -i 's\_Fractions_patch_aligned_doseweighted.mrc\_Fractions.mrc\g' cryosparc_cp.star
Also does not work.
Here is the error message
[CPU: 299.0 MB Avail: 477.36 GB]
Traceback (most recent call last):
File "cryosparc_master/cryosparc_compute/run.py", line 95, in cryosparc_master.cryosparc_compute.run.main
File "/home/cryosparcuser/Downloads/cryosparc_worker/cryosparc_compute/jobs/imports/run.py", line 365, in run_import_particles
assert do_blob or do_ctf or do_location or do_pose or do_filament, "Could not import star file: too many fields missing. "
AssertionError: Could not import star file: too many fields missing.
What happens if you do NOT toggle ‘Ignore pose data’? Additionally, what happens if you do NOT toggle ‘Ignore pose data’ and give it (drag in) the source exposures?
I would check again your .star file. Does your .star file have data_optics header present in the header such as below? If not, there are some microscope param overrides to set when you are building Import Particle Stack.
You are getting “AssertionError: Could not import star file: too many fields missing.”, because microscope parameters (voltage, Cs, amplitude contrast, and pixel size) need to be present to import particle stacks (please see the screenshot below). If these parameters are not in your .star, I’d provide them in the import job.
I also noticed that you did not provide the Source Exposures for input. To preserve the particle locations, you would need the source micrographs as the input when you’re importing the particle stack.
Additionally, editing the .star with sed to truncate the micrograph names is not needed. When you are building Import Particle Stack, you can tweak the lengths of both the input exposure and the query rlnMicrographName.
For your case, I would cut 4 characters (.mrc) from input exposure file name suffix and 31 characters (_patch_aligned_doseweighted.mrc) from rlnMicrographName base name suffix to have everything end with _Fractions.
I’d suggest having a look at the guide if you have not already done so:
Hi @Ahn! In addition to the guidance above, I want to note that if you’re importing just particle pick locations, your star file has neither raw data nor pose data. So you’re right that you should turn on both of Ignore raw data and Ignore pose data.
You’ll also need to fill out the Micrograph Parameter Overrides section with the appropriate information, since it’s not present in your STAR file.
(those settings should be replaced with whatever is appropriate for your images, of course)
The most important of these is the Pixel Size (Angstrom). Your pick locations from crYOLO are in pixels X/Y, but CryoSPARC uses a convention of what fraction along the micrograph in X/Y. The pixel size is needed to convert between these two, and that’s likely the field that the import job is complaining about being missing.
And finally, as far as the micrograph names, what you’re trying to get to match are
The names of the micrographs you used for crYOLO
The names of the input micrographs for this job
Since you used the motion-corrected micrographs for crYOLO try plugging the output of Patch Motion Correction or Patch CTF Estimation into this job’s Source Exposures input and leaving all “Length of … to cut” as 0 and see if that works!