Template picker failing with negative stain

Hi All,

I’m encountering a few errors running template picker on a negative stain dataset (69 micrographs) with cryosparc v2.4.0. 995 particles were extracted (box size 256) with the negative stain images option turned on. After 2D classification and selection of 7 classes, I encountered the following error while running the Template Picker job (ptcl diameter 300 Å):

Traceback (most recent call last):
File “cryosparc2_worker/cryosparc2_compute/run.py”, line 78, in cryosparc2_compute.run.main
File “cryosparc2_worker/cryosparc2_compute/jobs/template_picker_gpu/run.py”, line 111, in cryosparc2_compute.jobs.template_picker_gpu.run.run
File “cryosparc2_worker/cryosparc2_compute/jobs/template_picker_gpu/run.py”, line 192, in cryosparc2_compute.jobs.template_picker_gpu.run.run
File “/home/cryosparc2/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/gpuarray.py”, line 210, in init
self.gpudata = self.allocator(self.size * self.dtype.itemsize)
MemoryError: cuMemAlloc failed: out of memory

Repeating the job with 3 classes produces this error:

Traceback (most recent call last):
File “cryosparc2_worker/cryosparc2_compute/run.py”, line 78, in cryosparc2_compute.run.main
File “cryosparc2_worker/cryosparc2_compute/jobs/template_picker_gpu/run.py”, line 111, in cryosparc2_compute.jobs.template_picker_gpu.run.run
File “cryosparc2_worker/cryosparc2_compute/jobs/template_picker_gpu/run.py”, line 208, in cryosparc2_compute.jobs.template_picker_gpu.run.run
File “/home/cryosparc2/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/skcuda/fft.py”, line 115, in init
onembed, ostride, odist, self.fft_type, self.batch)
File “/home/cryosparc2/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/skcuda/cufft.py”, line 222, in cufftPlanMany
cufftCheckStatus(status)
File “/home/cryosparc2/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/skcuda/cufft.py”, line 110, in cufftCheckStatus
raise cufftExceptions[status]
cufftAllocFailed

The job runs with 1 or 2 classes as templates, but template picker picks only dark spots at the edges of particles.

Best,

Yazan

Hi @Yazan,

We’ve recorded the issue - we’re working on it.

Thanks for the report.

Best,
Ali!

Yes, I have the same issue. Using white templates on black, but software picks dark spots close to particles…

I am having a similar error with Cryo data. Template picker is working when I use a single class but crashes when I go to 2 or more classes. Either via the alocmemory error or just general crashing. Any help would be great.

Cheers,

I have the same issue even after a forced update a couple of days ago. Has anyone found a solution to this problem?

I don’t know about the error but if you are referring to only dark spots around your particle being picked, you might consider inverting the contrast of your negative stain micrographs using e2proc2d.py (part of EMAN2) using the --multi=-1 option as Zhijie suggested in another thread. This way you can treat your micrographs as if they were cryo and template picking will work better.

Nice trick Yazz, thanks. Worked like a charm.