Hi,
Does anyone have a suggestion as to how to remove overfocus mics in an automated way? One would think with the contrast inversion it would be straightforward, but it does not seem to be, and is especially challenging close to focus.
We have one dataset where we have a significant percentage of overfocus mics, and I’ve yet to find an easy way to remove them at the micrograph curation stage. Of course it is possible to do so by manual inspection, but this is rather tedious in a dataset of 10k+ mics…
Cheers
Oli
2 Likes
Can you redo CTF estimation and set the minimum to -20,000 or similar? I had some success doing that with CTFFIND - it didn’t catch all of them, but only a half dozen slipped through, which were later picked up because no particles were identified in template picking. Maybe I just got lucky.
2 Likes
I tried that with Patch CTF and it failed (I think it may have thrown an error but would need to double check - I do remember I tried and it didn’t work)… haven’t tried with CTFFIND though, good suggestion!
1 Like
My (one) test with asking Patch CTF to estimate overfocus wasn’t a roaring success, although that was back in 3.something…
What numerical defocus is estimated for the overfocus mics? Just curious.
Similar to the absolute value in defocus IIRC but would need to check
Tried CTFFIND but the version packages with cryosparc doesn’t seem to work with fp16 mics ![:frowning: :frowning:](https://discuss.cryosparc.com/images/emoji/apple/frowning.png?v=12)
EDIT:
@DanielAsarnow in patch CTF there doesn’t seem to be a huge distinction in score for the overfocus & underfocus solutions:
Ah, yes, that’s a pain. I tried just drop-in replacing CTFFIND5, but it doesn’t work and even going through step-by-step and changing the scripts which call it, I can’t seem to get it working (although it works on 16-bit micrographs perfectly well…)
Ok I take it back - with default settings it didn’t initially seem to work well, but at least with “full frame” Patch CTF (1x1 knots) it does seem to fairly consistently distinguish overfocus from underfocus mics!
EDIT:
Although if I edit the maximum resolution at all (changing from 4Å to 5Å) I get this error:
Traceback (most recent call last):
File "cryosparc_master/cryosparc_compute/run.py", line 115, in cryosparc_master.cryosparc_compute.run.main
File "cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py", line 400, in cryosparc_master.cryosparc_compute.jobs.ctf_estimation.run.run
File "/home/exx/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/pyplot.py", line 1998, in ylim
ret = ax.set_ylim(*args, **kwargs)
File "/home/exx/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 3898, in set_ylim
return self.yaxis._set_lim(bottom, top, emit=emit, auto=auto)
File "/home/exx/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/axis.py", line 1210, in _set_lim
v0 = self.axes._validate_converted_limits(v0, self.convert_units)
File "/home/exx/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 3585, in _validate_converted_limits
raise ValueError("Axis limits cannot be NaN or Inf")
ValueError: Axis limits cannot be NaN or Inf
2 Likes
I guess you need a higher Cs objective then ![:wink: :wink:](https://discuss.cryosparc.com/images/emoji/apple/wink.png?v=12)
(At 2.7mm & 1 µm the over/under solutions only diverge around 4.5Å).
Seems a post-fit check using the sign of the deviation from background around the first peak would be an easy fix.
2 Likes
After trying with a larger test set - it doesn’t work reliably. A lot of underfocus mics are classified as overfocus and vice-versa. Hmmm.
Found a work around for running CTFFIND without redoing patch motion - switch it to operate on movies. A lot slower, but it does work… but CTFFIND doesn’t seem to do any better at distinguishing overfocus from underfocus mics. hmm.
1 Like
Interesting. I’ll find my archive of that dataset and try it again; it was a test dataset collected with JADAS when we were comparing the CryoARM300 and Titan G4 and was basically terrible. When the mics were overfocus, they were really overfocus.
1 Like