CryoSPARC v2.16 beta available: deep picking functionality

Dear cryoSPARC users,

We have developed a new suite of deep-Learning based particle picking jobs in cryoSPARC that enable a user to train deep neural networks and then use those models to pick particles from micrographs. The first versions of these are available in a new beta version of cryoSPARC that can be optionally downloaded and used. We are looking for beta testers to try the new features and updated dependencies - anyone who wishes can upgrade to the beta version. We would appreciate any feedback users can provide, as well as bug reports or issues arising from the new dependencies.

Specifically, the new version includes new job types: Deep Picker Train (BETA) and Deep Picker Inference (BETA). Deep Picker Train (BETA) allows the user to use a subset of micrographs and corresponding particles to train a deep neural network which can then be used in the Deep Picker Inference (BETA) job to pick particles from the remaining micrographs. You can find documentation on the new job types here: https://guide.cryosparc.com/processing-data/all-job-types-in-cryosparc/deep-picking/deep-network-particle-picker

These new jobs require updates to cryoSPARC’s core dependencies. These new dependencies will be automatically installed when you update to this version of cryoSPARC. The new installer bundles are substantially larger than before, so update may take some time.

If you do wish to update, you can do so from any version of cryoSPARC by running:

cryosparcm update --version=v2.16.0-deeppick_privatebeta

# or, for cryoSPARC live:
cryosparcm update --version=v2.16.1-live_deeppick_privatebeta

If you run into any issues on the deep picker and/or dependencies, please reply to this thread.

Thank you!

Hi @apunjani,

I just tested this on an EMPIAR aldolase dataset - first impressions are that it worked pretty well, and very fast, using the default parameters, changing only the particle diameter (I note that the docs say particle radius, but the GUI says diameter).

The only thing is that the power threshold slider does not show up at all in Inspect Particle Picks, and neither do any picks (even though they are counted in the list view, and I can extract them), meaning it is not possible to change the threshold for extraction.

Cheers
Oli

How important is complete labelling for the deep picker implemented here? For topaz, which uses the positive unlabeled framework, incomplete (but accurate) picking is fine for training, whereas for other CNN based pickers complete picking is important.

Initially I tried using just particles from the final structure for training, but this doesn’t give good results - the picks using such a model are accurate, but it misses a lot of good particles.

Also, is there any prospect of a general model being supplied with the deep picker, so it can be used with Live, for example?

Hi @olibclarke,

Complete picking is not absolutely mandatory but it is more important for the deep picker than it is for Topaz. For example, having more complete picks on a smaller subset of micrographs should have improved results over less complete picks over a multitude of micrographs. Overambitious training picks should also yield improved results over incomplete but more accurate picks.

However, we have found that the models can perform well without complete picks. It is possible that the parameters may have to be fine tuned for your case but it is also possible that the picks from the final structure were too sparse for the model to train effectively.

Also, there are plans to include a general model.

Regards,
Jay Yoo

1 Like

I tried to update but apparently failed, since after checking the status I receive the following information :

How can I fix this?


CryoSPARC System master node installed at

/home/cryosparc/cryosparc2_master

Current cryoSPARC version: v2.16.0-deeppick_privatebeta


/home/cryosparc/cryosparc2_master/bin/cryosparcm: line 695: supervisorctl: command not found

I’m trying this on some of our apoferritin data, but I’m having an issue where the Deep Picker Train job fails saying that no particles corresponding to input micrographs were found. I use the micrographs from inspect particles and the particles from the selected 2D classes.

I’ve seen this as well, but I assumed it was because I accidentally included an empty micrograph, but that shouldn’t be the case for apoFe data…

Oli

HI @JMB,

This seems like the update didn’t complete successfully. In order to fix this, you are going to have to re-install cryoSPARC.
Please note your database will still be intact; but I’d suggest making a backup: https://guide.cryosparc.com/setup-configuration-and-management/management-and-monitoring/cryosparcm#cryosparcm-backup

Since this version of cryoSPARC is a private version, you will first have to install a stable version of cryoSPARC (v2.15.0) , then update again to v2.16.0-deeppick_privatebeta.

In order to do so, first complete a forced update: https://guide.cryosparc.com/setup-configuration-and-management/software-updates#forced-update
Once that’s done, you can then run the update command again:
cryosparcm update --version=v2.16.0-deeppick_privatebeta
Please note any errors that occur during the update process.

Dear Stephan,
Unfortunately the proposed fix does not work since there is always an error like
supervisorctl: command not found (see below)

JMB


(base) [cryosparc@gpu ~]$ cryosparcm backup

Backing up to /home/cryosparc/cryosparc2_database/backup/cryosparc_backup_2020_06_19_09h54.archive

/home/cryosparc/cryosparc2_master/bin/cryosparcm: line 111: supervisorctl: command not found
(base) [cryosparc@gpu ~]$ cryosparcm update --override
CryoSPARC current version v2.16.0-deeppick_privatebeta
update starting on Fri Jun 19 09:55:56 CEST 2020

No version specified - updating to latest version.

=============================
Forcing update to version v2.15.0…

/home/cryosparc/cryosparc2_master/bin/cryosparcm: line 111: supervisorctl: command not found


Hi @hansenbry,

That error arises when the ‘location/micrograph_path’ particle result field group does not match any of the ‘micrograph_blob/path’ result field groups in the micrograph dataset. Depending on how the training picks were created, there may be a discrepancy.

Regards,
Jay Yoo

Hi @jyoo I assumed that was the issue, but I don’t understand how to resolve it. I’m using the micrographs input used for particle selection and the particles selected from the 2D classification. So the path is connected as best as I can do in the program. Is there a better set of inputs to use for the deep picker?

Hi @hansenbry,

So long as the micrographs being input into the training job were used to create the initial picks, it should work. Could you try using a micrographs output from earlier in your pipeline such as the output that is being passed into your inspect particle picks job or an even earlier micrographs output? However, there may be some issues with imported particles.

Regarding @olibclarke’s earlier assumption, the error should only be raised if none of the particles can be matched to micrographs. A single empty micrograph by itself should not raise the error.

Regards,
Jay Yoo

Hi @jyoo I’ve done both and they give the same error.

Hi @hansenbry,

Could you try using the patch ctf job as the micrographs input? In the mean time, I’ll work on a more reliable way of identifying connected particles and micrographs. Sending the tree view would help as well.

Regards,
Jay Yoo

@jyoo I got the same error. I can send a screenshot of the tree view. How do I zoom in on the tree view? I want to have it be bigger before I screenshot it.

Hi @stephan,
I re-installed cryosparc from scratch.
Unfortunately, after installation the same ERROR is printed.

I add all the “error” messages during the installation procedure.
How could I fix this?
Is there (out of the blue) something else missing on my system?
Cheers
JMB


MASTER ERROR:


Preparing to install all pip packages…

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Processing ./deps_bundle/python/python_packages/pip_packages/Flask-JSONRPC-0.3.1.tar.gz
Processing ./deps_bundle/python/python_packages/pip_packages/Flask-PyMongo-0.5.1.tar.gz
Processing ./deps_bundle/python/python_packages/pip_packages/libtiff-0.4.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-req-build-BeYh4e/setup.py”, line 77, in
from numpy.distutils.core import setup, Extension
ImportError: No module named numpy.distutils.core

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-req-build-BeYh4e/

Done.
pip packages installation successful.

Main dependency installation completed. Continuing…


WORKER ERROR:


Preparing to install all pip packages…

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Processing ./deps_bundle/python/python_packages/pip_packages/Flask-JSONRPC-0.3.1.tar.gz
Processing ./deps_bundle/python/python_packages/pip_packages/Flask-PyMongo-0.5.1.tar.gz
Processing ./deps_bundle/python/python_packages/pip_packages/libtiff-0.4.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-req-build-1vPSLc/setup.py”, line 77, in
from numpy.distutils.core import setup, Extension
ImportError: No module named numpy.distutils.core

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-req-build-1vPSLc/

Done.
pip packages installation successful.


CONNECTION:

(base) [cryosparc@gpu cryosparc2_worker]$ bin/cryosparcw connect --update --lane gpu --worker gpu --master gpu --port 39000 --ssdpath /scr/cryosparc/ --ssdquota 2800000
Traceback (most recent call last):
File “bin/connect.py”, line 53, in
import cryosparc2_compute.client as client
File “/home/cryosparc/cryosparc2_worker/cryosparc2_compute/client.py”, line 12, in
import numpy as n
ImportError: No module named numpy


FINALLY:

(base) [cryosparc@gpu ~]$ cryosparcm status

CryoSPARC System master node installed at
/home/cryosparc/cryosparc2_master
Current cryoSPARC version: v2.15.0

/home/cryosparc/cryosparc2_master/bin/cryosparcm: line 695: supervisorctl: command not found
(base) [cryosparc@gpu ~]$

Hi @hansenbry,

I send you a message, we can continue the discussion there.

Regards,
Jay Yoo

Hi @stephan

We are back on track. Cryosparc is running again by re-installing cryosparc 2.15 from scratch in sudo mode (–allowroot) then updated to v2.16.0-deeppick_privatebeta both the master and the worker.

–> Cryosarc is running but now we have the following problems:

A)

The “Deep Picker Train”-job failed with

File “cryosparc2_worker/cryosparc2_compute/jobs/deep_picker/run_deep_picker.py”, line 1, in init cryosparc2_compute.jobs.deep_picker.run_deep_picker ImportError: No module named tensorflow

B)

Independent of the browser (Firefox, Chrom or Safari) used to run crysosparc every input given is only visible after refreshing the page, searching the job and clicking on “building”.

How could we fix these issues?

JMB

Hi @apunjani,

Inspect Particle picks seems to be broken when using particles from Deep Inference (at least after applying the latest patch).

The NCC slider seems to have encroached on the local power slider, and the latter cannot be adjusted (this is the case in both Safari and Chrome).

Cheers
Oli