I encountered a bug when trying to pick particles by generating templates from a .mrc map file.
The map was produced in Chimera from a pdb file with the command molmap #0 15 and saved as a map file (.mrc).
Then imported into cryoSPARC (2.15.0+200513) with the “Import 3D Volumes” job.
This volume was then used to “Create Templates” job which produces the following error: Traceback (most recent call last): File "cryosparc2_worker/cryosparc2_compute/run.py", line 85, in cryosparc2_compute.run.main File "cryosparc2_worker/cryosparc2_compute/jobs/create_templates/run.py", line 45, in cryosparc2_compute.jobs.create_templates.run.run File "cryosparc2_compute/fourier.py", line 152, in zeropad new_X[a:b,a:b,a:b] = X ValueError: could not broadcast input array from shape (33,43,41) into shape (40,40,40).
If I understand correctly, the dimensions are not a cube and/or odd which can’t be used with the current cryoSPARC script.
I found that resizing the box using Relion worked to circumvent this issue: relion_image_handler --i input.mrc --new_box 40 --o output.mrc
I hope others find this if needed or it’s fixed in future releases.
Unfortunately, I’m not sure how to get “resample” to work. I’ve tried a number of ways but can only get it to scale by whole numbers, which significantly reduces the box size. While I’m not sure how much that matters to cryoSPARC, my understanding is that’s a loss in resolution by 1/2.
The closest I could come up with is: vop resample #1 onGrid #2 gridStep 1,1,2
I’m a total beginner at this so if you or anyone else has a better method or thinks this is wrong then please leave a comment!
Instead, I’ve found something here which copies the map twice, moves them in opposite directions, then add all three together. This works to increase the box size along one axis but I imagine could be applied to all three.
My process is as follows:
Generate molmap: molmap #0 15
Copy volume: vop add #0
Move it over an excessive amount: move z 300 model #1 coord #1
Copy another volume: vop add #1
Move this the other direction: move z -300 model #2 coord #2
Add all three together: vop add #0,1,2 scale 1,0,0
Either resample or use “Region Bounds” to make the box a cube
Again, I’m a total beginner so please express criticism, comments, etc.
Generate a 3D map on scale with your data using ab initio followed by homogeneous refinement. The map can be junk. You need the dimensions, not the content. You can use a small subset of the particles to expedite process.
Read map into chimera and move your PDB to center of this junk to generate centered templates
Make a map of your PDB same way you did above
Resample the map on the same grid dimensions as your data
vop resample #1 onGrid #0
Note: your map was read in first (#0). Your PDB was read in second (#1)